aboutsummaryrefslogtreecommitdiffstats
path: root/railties/lib/rails_generator/generators/components/model/templates/model.rb
blob: 8bf93b9e8b64d45e68eabe614c837b587fb0ba7c (plain) (blame)
1
2
3
4
5
class <%= class_name %> < ActiveRecord::Base
<% attributes.select { |a| a.type.to_s == 'references' }.each do |attribute| -%>
  belongs_to :<%= attribute.name %>
<% end -%>
end