Skip to content

Commit

Permalink
Get rid of deprecation warning (on the edge rails)
Browse files Browse the repository at this point in the history
config.generators in Rails::Railtie is deprecated.
But, we should keep it for Rails 3.0.x.
  • Loading branch information
kuroda authored and josevalim committed Nov 15, 2010
1 parent d1709eb commit f1d0a21
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions lib/responders.rb
Expand Up @@ -9,7 +9,11 @@ module Responders

class Railtie < ::Rails::Railtie
config.responders = ActiveSupport::OrderedOptions.new
config.generators.scaffold_controller = :responders_controller
if config.respond_to?(:app_generators)
config.app_generators.scaffold_controller = :responders_controller
else
config.generators.scaffold_controller = :responders_controller
end

# Add load paths straight to I18n, so engines and application can overwrite it.
require 'active_support/i18n'
Expand All @@ -21,4 +25,4 @@ class Railtie < ::Rails::Railtie
end
end
end
end
end

0 comments on commit f1d0a21

Please sign in to comment.