diff options
Diffstat (limited to 'railties/lib/rails_generator/generators/components')
-rw-r--r-- | railties/lib/rails_generator/generators/components/model/templates/model.rb | 2 |
1 files changed, 1 insertions, 1 deletions
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 |