Sha256: f03cf0a7ec5d8a276cfd16c66cfbdb771a19b213a50c3cfa99921fa1a5b3d3c6
Contents?: true
Size: 675 Bytes
Versions: 22
Compression:
Stored size: 675 Bytes
Contents
<% module_namespacing do -%> class <%= class_name %> < <%= parent_class_name.classify %> <% attributes.select {|attr| attr.reference? }.each do |attribute| -%> belongs_to :<%= attribute.name %> <% end -%> <% # These are BrowserCMS specific extensions to the model generator. -%> <% attributes.select {|attr| attr.type == :category }.each do |attribute| -%> belongs_to_category <% end -%> <% attributes.select {|attr| attr.type == :attachment }.each do |attribute| -%> has_attachment :<%= attribute.name %> <% end -%> <% attributes.select {|attr| attr.type == :attachments }.each do |attribute| -%> has_many_attachments :<%= attribute.name %> <% end -%> end <% end -%>
Version data entries
22 entries across 22 versions & 2 rubygems