Skip to content

Commit

Permalink
Fix warnings in railties configuration and initializeable
Browse files Browse the repository at this point in the history
  • Loading branch information
josh committed Dec 14, 2009
1 parent ffb3517 commit f70079e
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 11 deletions.
22 changes: 13 additions & 9 deletions railties/lib/rails/configuration.rb
Expand Up @@ -2,15 +2,19 @@


module Rails module Rails
class Configuration class Configuration
attr_accessor :cache_classes, :load_paths, :load_once_paths, :after_initialize_blocks, attr_accessor :action_controller, :action_mailer, :action_view,
:frameworks, :framework_root_path, :root, :gems, :plugins, :active_record, :active_resource, :active_support,
:i18n, :gems, :whiny_nils, :consider_all_requests_local, :after_initialize_blocks, :cache_classes,
:action_controller, :active_record, :action_view, :active_support, :consider_all_requests_local, :dependency_loading, :gems,
:action_mailer, :active_resource, :load_once_paths, :logger, :metals, :plugins,
:reload_plugins, :log_path, :log_level, :logger, :preload_frameworks, :preload_frameworks, :reload_plugins, :serve_static_assets,
:database_configuration_file, :cache_store, :time_zone, :time_zone, :whiny_nils
:view_path, :metals, :controller_paths, :routes_configuration_file,
:eager_load_paths, :dependency_loading, :paths, :serve_static_assets 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 def initialize
@load_once_paths = [] @load_once_paths = []
Expand Down
4 changes: 2 additions & 2 deletions railties/lib/rails/initializable.rb
Expand Up @@ -5,7 +5,7 @@ def self.included(base)
end end


class Initializer class Initializer
attr_reader :name, :before, :after, :global, :block attr_reader :name, :block


def initialize(name, context, options, &block) def initialize(name, context, options, &block)
@name, @context, @options, @block = name, context, options, block @name, @context, @options, @block = name, context, options, block
Expand Down Expand Up @@ -62,7 +62,7 @@ def index_for(name)
end end


def run_initializers(*args) def run_initializers(*args)
return if @ran return if instance_variable_defined?(:@ran)
initializers.each do |initializer| initializers.each do |initializer|
initializer.run(*args) initializer.run(*args)
end end
Expand Down

0 comments on commit f70079e

Please sign in to comment.