diff options
Diffstat (limited to 'railties/lib')
-rw-r--r-- | railties/lib/rails/generators/resource_helpers.rb | 4 |
1 files changed, 1 insertions, 3 deletions
diff --git a/railties/lib/rails/generators/resource_helpers.rb b/railties/lib/rails/generators/resource_helpers.rb index a01eb57651..7329ee9f48 100644 --- a/railties/lib/rails/generators/resource_helpers.rb +++ b/railties/lib/rails/generators/resource_helpers.rb @@ -15,12 +15,10 @@ module Rails # Set controller variables on initialization. def initialize(*args) #:nodoc: super + controller_name = name if options[:model_name] - controller_name = name self.name = options[:model_name] assign_names!(self.name) - else - controller_name = name end if name == name.pluralize && name.singularize != name.pluralize && !options[:force_plural] |