Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

moving controller_name assignment before model name condition

  • Loading branch information...
commit 41722dd4440c992b3fd4e6181e9ddd0c7c3709e6 1 parent bf19131
@anilmaurya anilmaurya authored rafaelfranca committed
Showing with 1 addition and 3 deletions.
  1. +1 −3 railties/lib/rails/generators/resource_helpers.rb
View
4 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]
Please sign in to comment.
Something went wrong with that request. Please try again.