mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
moving controller_name assignment before model name condition
This commit is contained in:
parent
bf191318af
commit
41722dd444
1 changed files with 1 additions and 3 deletions
|
@ -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]
|
||||
|
|
Loading…
Reference in a new issue