diff options
author | anilmaurya <anilmaurya8dec@gmail.com> | 2014-01-20 14:37:53 +0530 |
---|---|---|
committer | Rafael Mendonça França <rafaelmfranca@gmail.com> | 2014-01-20 16:50:29 -0200 |
commit | 41722dd4440c992b3fd4e6181e9ddd0c7c3709e6 (patch) | |
tree | 737837edd9d3e7903747c6698a05e53f261145ff /railties/lib | |
parent | bf191318afb62a66fe37bd2649ecabfc4c8744a6 (diff) | |
download | rails-41722dd4440c992b3fd4e6181e9ddd0c7c3709e6.tar.gz rails-41722dd4440c992b3fd4e6181e9ddd0c7c3709e6.tar.bz2 rails-41722dd4440c992b3fd4e6181e9ddd0c7c3709e6.zip |
moving controller_name assignment before model name condition
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] |