2009-12-31 15:28:48 -05:00
|
|
|
require "action_view"
|
2010-01-12 18:41:04 -05:00
|
|
|
require "rails"
|
|
|
|
|
|
|
|
module ActionView
|
|
|
|
class Railtie < Rails::Railtie
|
2010-03-26 13:47:55 -04:00
|
|
|
config.action_view = ActiveSupport::OrderedOptions.new
|
2010-01-12 18:41:04 -05:00
|
|
|
|
2010-02-15 09:44:30 -05:00
|
|
|
require "action_view/railties/log_subscriber"
|
2010-03-26 13:47:55 -04:00
|
|
|
log_subscriber :action_view, ActionView::Railties::LogSubscriber.new
|
2010-01-14 13:53:07 -05:00
|
|
|
|
|
|
|
initializer "action_view.cache_asset_timestamps" do |app|
|
|
|
|
unless app.config.cache_classes
|
2010-03-29 20:08:08 -04:00
|
|
|
ActiveSupport.on_load(:action_view) do
|
2010-03-07 09:24:30 -05:00
|
|
|
ActionView::Helpers::AssetTagHelper.cache_asset_timestamps = false
|
|
|
|
end
|
2010-01-14 13:53:07 -05:00
|
|
|
end
|
|
|
|
end
|
2010-03-26 13:47:55 -04:00
|
|
|
|
|
|
|
initializer "action_view.set_configs" do |app|
|
2010-03-29 20:08:08 -04:00
|
|
|
ActiveSupport.on_load(:action_view) do
|
2010-03-26 13:47:55 -04:00
|
|
|
app.config.action_view.each do |k,v|
|
|
|
|
send "#{k}=", v
|
|
|
|
end
|
|
|
|
end
|
|
|
|
end
|
2010-01-12 18:41:04 -05:00
|
|
|
end
|
|
|
|
end
|