Permalink
Browse files

moving controller_name assignment before model name condition

  • Loading branch information...
1 parent bf19131 commit 41722dd4440c992b3fd4e6181e9ddd0c7c3709e6 @anilmaurya anilmaurya committed with rafaelfranca Jan 20, 2014
Showing with 1 addition and 3 deletions.
  1. +1 −3 railties/lib/rails/generators/resource_helpers.rb
@@ -15,12 +15,10 @@ def self.included(base) #:nodoc:
# 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]

0 comments on commit 41722dd

Please sign in to comment.