2012-02-22 18:14:00 +00:00
|
|
|
require 'rails/railtie'
|
|
|
|
|
|
|
|
require 'active_support'
|
|
|
|
require 'active_support/json'
|
|
|
|
require 'active_support/core_ext/class/attribute_accessors'
|
|
|
|
|
|
|
|
require 'rabl-fast-json/version'
|
2012-03-02 13:39:20 +00:00
|
|
|
require 'rabl-fast-json/helpers'
|
2012-02-22 18:14:00 +00:00
|
|
|
require 'rabl-fast-json/template'
|
|
|
|
require 'rabl-fast-json/compiler'
|
2012-04-09 23:03:07 +00:00
|
|
|
|
|
|
|
require 'rabl-fast-json/renderer'
|
|
|
|
|
2012-02-27 13:49:34 +00:00
|
|
|
require 'rabl-fast-json/library'
|
2012-02-22 18:14:00 +00:00
|
|
|
require 'rabl-fast-json/handler'
|
|
|
|
require 'rabl-fast-json/railtie'
|
|
|
|
|
2012-04-09 23:03:07 +00:00
|
|
|
|
|
|
|
|
2012-02-22 10:42:38 +00:00
|
|
|
module RablFastJson
|
2012-04-03 17:04:14 +00:00
|
|
|
extend self
|
2012-04-09 23:03:07 +00:00
|
|
|
|
2012-04-02 14:22:43 +00:00
|
|
|
mattr_accessor :cache_templates
|
|
|
|
@@cache_templates = true
|
|
|
|
|
2012-04-03 17:04:14 +00:00
|
|
|
def configure
|
2012-04-02 14:22:43 +00:00
|
|
|
yield self
|
|
|
|
end
|
2012-04-09 23:03:07 +00:00
|
|
|
|
2012-04-03 17:04:14 +00:00
|
|
|
def cache_templates?
|
2012-04-02 14:22:43 +00:00
|
|
|
ActionController::Base.perform_caching && @@cache_templates
|
|
|
|
end
|
2012-02-22 10:42:38 +00:00
|
|
|
end
|