diff options
author | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-22 16:02:53 +0000 |
---|---|---|
committer | Jeremy Kemper <jeremy@bitsweat.net> | 2005-10-22 16:02:53 +0000 |
commit | d0a3185062d87358013de455360725600d700175 (patch) | |
tree | ea65e25c2175b0c937dadd4b1178afaf8b3e2956 /railties | |
parent | 3b33a6f3368e58e3602949583e5ebfe4e4481f13 (diff) | |
download | rails-d0a3185062d87358013de455360725600d700175.tar.gz rails-d0a3185062d87358013de455360725600d700175.tar.bz2 rails-d0a3185062d87358013de455360725600d700175.zip |
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
Diffstat (limited to 'railties')
-rw-r--r-- | railties/CHANGELOG | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb | 2 |
2 files changed, 3 insertions, 1 deletions
diff --git a/railties/CHANGELOG b/railties/CHANGELOG index 2f6bd079eb..8c7a073f68 100644 --- a/railties/CHANGELOG +++ b/railties/CHANGELOG @@ -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] diff --git a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb index 0f789efc83..7987e888e0 100644 --- a/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb +++ b/railties/lib/rails_generator/generators/components/scaffold/scaffold_generator.rb @@ -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? |