lib/rails-env.rb in rails-env-1.0.2 vs lib/rails-env.rb in rails-env-1.0.3
- old
+ new
@@ -1,7 +1,18 @@
require 'rails-env/version'
+module Rails
+ class << self
+ env_method = instance_method(:env=)
+
+ define_method :env= do |env|
+ env_method.bind(self).call(env)
+ Rails.env.extend(RailsEnv::Extension)
+ end
+ end
+end
+
module RailsEnv
class Railtie < Rails::Railtie
initializer 'rails-env' do
Rails.env.extend(Extension)
end
@@ -13,9 +24,10 @@
def self.propagate_configuration!
propagate(:action_mailer, '::ActionMailer::Base')
propagate(:active_record, '::ActiveRecord::Base')
propagate(:active_job, '::ActiveJob::Base')
+ propagate(:action_controller, '::ActionController::Base')
propagate(:time_zone, '::Time', :zone)
propagate_i18n
end
def self.propagate_i18n