diff options
author | Yehuda Katz <wycats@gmail.com> | 2009-05-16 12:28:25 -0700 |
---|---|---|
committer | Yehuda Katz <wycats@gmail.com> | 2009-05-16 12:28:25 -0700 |
commit | 4fa871654dc6e591c08cbc53e7eac2e008056fee (patch) | |
tree | 8c243931cb5ac3f45e618fbc8c35a8d7994c3f6a /railties/lib/rails_generator | |
parent | db1bf3650d7450811f5dfddc5c5163a70683e37a (diff) | |
download | rails-4fa871654dc6e591c08cbc53e7eac2e008056fee.tar.gz rails-4fa871654dc6e591c08cbc53e7eac2e008056fee.tar.bz2 rails-4fa871654dc6e591c08cbc53e7eac2e008056fee.zip |
Get Railties passing again
Diffstat (limited to 'railties/lib/rails_generator')
-rw-r--r-- | railties/lib/rails_generator/generators/applications/app/template_runner.rb | 2 | ||||
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/templates/model.rb | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/railties/lib/rails_generator/generators/applications/app/template_runner.rb b/railties/lib/rails_generator/generators/applications/app/template_runner.rb index 3b49b1fa92..0e24d11950 100644 --- a/railties/lib/rails_generator/generators/applications/app/template_runner.rb +++ b/railties/lib/rails_generator/generators/applications/app/template_runner.rb @@ -227,7 +227,7 @@ module Rails # def generate(what, *args) log 'generating', what - argument = args.map(&:to_s).flatten.join(" ") + argument = args.map {|arg| arg.to_s }.flatten.join(" ") in_root { run_ruby_script("script/generate #{what} #{argument}", false) } end diff --git a/railties/lib/rails_generator/generators/components/model/templates/model.rb b/railties/lib/rails_generator/generators/components/model/templates/model.rb index 6fcf393bdf..0656b06dfe 100644 --- a/railties/lib/rails_generator/generators/components/model/templates/model.rb +++ b/railties/lib/rails_generator/generators/components/model/templates/model.rb @@ -1,5 +1,5 @@ class <%= class_name %> < ActiveRecord::Base -<% attributes.select(&:reference?).each do |attribute| -%> +<% attributes.select {|attr| attr.reference? }.each do |attribute| -%> belongs_to :<%= attribute.name %> <% end -%> end |