lib/restrict_cache/railtie.rb in restrict_cache-0.1.1 vs lib/restrict_cache/railtie.rb in restrict_cache-0.1.2

- old
+ new

@@ -1,17 +1,19 @@ module RestrictCache class Railtie < ::Rails::Railtie initializer "restrict_cache" do - require "restrict_cache/action_controller_ext" - require "restrict_cache/active_record_ext" + require "restrict_cache/rails_ext/all" ActiveSupport.on_load(:action_controller) do - ::ActionController::Base.send(:include, RestrictCache::ActionControllerExt) + ::ActionController::Base.send( + :include, RestrictCache::RailsExt::ActionController) end ActiveSupport.on_load(:active_record) do - ::ActiveRecord::Base.send(:include, RestrictCache::ActiveRecordExt::Base) - ::ActiveRecord::Relation.send(:include, RestrictCache::ActiveRecordExt::Relation) + ::ActiveRecord::Base.send( + :include, RestrictCache::RailsExt::ActiveRecord::Base) + ::ActiveRecord::Relation.send( + :include, RestrictCache::RailsExt::ActiveRecord::Relation) end end end end