diff options
author | Nicholas Seckar <nseckar@gmail.com> | 2006-06-28 20:53:00 +0000 |
---|---|---|
committer | Nicholas Seckar <nseckar@gmail.com> | 2006-06-28 20:53:00 +0000 |
commit | 81a6a60dc6dff2ad8c2a45bf17fc40e760224e30 (patch) | |
tree | 691d04124ae4a872a992eff39b1c2d86891fbe84 /railties/lib/rails_generator/generators | |
parent | c02d1f7d9b73f708d8f656044b096454344ccb78 (diff) | |
download | rails-81a6a60dc6dff2ad8c2a45bf17fc40e760224e30.tar.gz rails-81a6a60dc6dff2ad8c2a45bf17fc40e760224e30.tar.bz2 rails-81a6a60dc6dff2ad8c2a45bf17fc40e760224e30.zip |
Remove opts.on { |options[:option_name] } style hash assignment. Closes #4440.
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4502 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'railties/lib/rails_generator/generators')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/app_generator.rb | 6 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/model_generator.rb | 2 |
2 files changed, 4 insertions, 4 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/app_generator.rb b/railties/lib/rails_generator/generators/applications/app/app_generator.rb index 6d58b98fbe..bbdd3cb206 100644 --- a/railties/lib/rails_generator/generators/applications/app/app_generator.rb +++ b/railties/lib/rails_generator/generators/applications/app/app_generator.rb @@ -97,15 +97,15 @@ class AppGenerator < Rails::Generator::Base opt.separator 'Options:' opt.on("-r", "--ruby=path", String, "Path to the Ruby binary of your choice (otherwise scripts use env, dispatchers current path).", - "Default: #{DEFAULT_SHEBANG}") { |options[:shebang]| } + "Default: #{DEFAULT_SHEBANG}") { |v| options[:shebang] = v } opt.on("-d", "--database=name", String, "Preconfigure for selected database (options: mysql/oracle/postgresql/sqlite2/sqlite3).", - "Default: mysql") { |options[:db]| } + "Default: mysql") { |v| options[:db] = v } opt.on("-f", "--freeze", "Freeze Rails in vendor/rails from the gems generating the skeleton", - "Default: false") { |options[:freeze]| } + "Default: false") { |v| options[:freeze] = v } end def mysql_socket_location diff --git a/railties/lib/rails_generator/generators/components/model/model_generator.rb b/railties/lib/rails_generator/generators/components/model/model_generator.rb index 0940b57f73..e242482632 100644 --- a/railties/lib/rails_generator/generators/components/model/model_generator.rb +++ b/railties/lib/rails_generator/generators/components/model/model_generator.rb @@ -29,6 +29,6 @@ class ModelGenerator < Rails::Generator::NamedBase opt.separator '' opt.separator 'Options:' opt.on("--skip-migration", - "Don't generate a migration file for this model") { |options[:skip_migration]| } + "Don't generate a migration file for this model") { |v| options[:skip_migration] = v } end end |