Permalink
Browse files

Scaffold generator pays attention to the controller name. Closes #2562.

git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@2703 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
  • Loading branch information...
1 parent 3b33a6f commit d0a3185062d87358013de455360725600d700175 @jeremy jeremy committed Oct 22, 2005
View
@@ -1,5 +1,7 @@
*SVN*
+* Scaffold generator pays attention to the controller name. #2562 [self@mattmower.com]
+
* Include tasks from vendor/plugins/*/tasks in the Rakefile #2545 [Rick Olson]
@@ -46,7 +46,7 @@ class ScaffoldGenerator < Rails::Generator::NamedBase
def initialize(runtime_args, runtime_options = {})
super
- @controller_name = args.shift || ActiveRecord::Base.pluralize_table_names ? @name.pluralize : @name
+ @controller_name = args.shift or (ActiveRecord::Base.pluralize_table_names ? @name.pluralize : @name)
base_name, @controller_class_path, @controller_file_path, @controller_class_nesting, @controller_class_nesting_depth = extract_modules(@controller_name)
@controller_class_name_without_nesting, @controller_singular_name, @controller_plural_name = inflect_names(base_name)
if @controller_class_nesting.empty?

0 comments on commit d0a3185

Please sign in to comment.