diff options
author | Joshua Peek <josh@joshpeek.com> | 2009-12-14 15:42:48 -0600 |
---|---|---|
committer | Joshua Peek <josh@joshpeek.com> | 2009-12-14 15:42:48 -0600 |
commit | f70079efb10f6af1187dc55dfbecc87136dc4738 (patch) | |
tree | ff50244247203072e9bb6da78213c60dceead02a /railties/lib/rails | |
parent | ffb351713ea440deb4909fe35e031c5c40fdfdd9 (diff) | |
download | rails-f70079efb10f6af1187dc55dfbecc87136dc4738.tar.gz rails-f70079efb10f6af1187dc55dfbecc87136dc4738.tar.bz2 rails-f70079efb10f6af1187dc55dfbecc87136dc4738.zip |
Fix warnings in railties configuration and initializeable
Diffstat (limited to 'railties/lib/rails')
-rw-r--r-- | railties/lib/rails/configuration.rb | 22 | ||||
-rw-r--r-- | railties/lib/rails/initializable.rb | 4 |
2 files changed, 15 insertions, 11 deletions
diff --git a/railties/lib/rails/configuration.rb b/railties/lib/rails/configuration.rb index 3f43a48e2e..0449fe4ce5 100644 --- a/railties/lib/rails/configuration.rb +++ b/railties/lib/rails/configuration.rb @@ -2,15 +2,19 @@ require 'active_support/ordered_options' module Rails class Configuration - attr_accessor :cache_classes, :load_paths, :load_once_paths, :after_initialize_blocks, - :frameworks, :framework_root_path, :root, :gems, :plugins, - :i18n, :gems, :whiny_nils, :consider_all_requests_local, - :action_controller, :active_record, :action_view, :active_support, - :action_mailer, :active_resource, - :reload_plugins, :log_path, :log_level, :logger, :preload_frameworks, - :database_configuration_file, :cache_store, :time_zone, - :view_path, :metals, :controller_paths, :routes_configuration_file, - :eager_load_paths, :dependency_loading, :paths, :serve_static_assets + attr_accessor :action_controller, :action_mailer, :action_view, + :active_record, :active_resource, :active_support, + :after_initialize_blocks, :cache_classes, + :consider_all_requests_local, :dependency_loading, :gems, + :load_once_paths, :logger, :metals, :plugins, + :preload_frameworks, :reload_plugins, :serve_static_assets, + :time_zone, :whiny_nils + + attr_writer :cache_store, :controller_paths, + :database_configuration_file, :eager_load_paths, + :frameworks, :framework_root_path, :i18n, :load_paths, + :log_level, :log_path, :paths, :routes_configuration_file, + :view_path def initialize @load_once_paths = [] diff --git a/railties/lib/rails/initializable.rb b/railties/lib/rails/initializable.rb index 96234739cf..add10bd207 100644 --- a/railties/lib/rails/initializable.rb +++ b/railties/lib/rails/initializable.rb @@ -5,7 +5,7 @@ module Rails end class Initializer - attr_reader :name, :before, :after, :global, :block + attr_reader :name, :block def initialize(name, context, options, &block) @name, @context, @options, @block = name, context, options, block @@ -62,7 +62,7 @@ module Rails end def run_initializers(*args) - return if @ran + return if instance_variable_defined?(:@ran) initializers.each do |initializer| initializer.run(*args) end |