Sha256: b76486518c4fdb7abab33bc6913aa2589cc58bdb35767b6c962abb8baf477573

Contents?: true

Size: 242 Bytes

Versions: 6

Compression:

Stored size: 242 Bytes

Contents

class <%= class_name %> < ActiveRecord::Base
<% attributes.select(&:reference?).each do |attribute| -%>
  belongs_to :<%= attribute.name %>
<% end -%>
<% for attachment in attachments -%>
  has_attached_file :<%= attachment %>
<% end -%>
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
view_mapper-0.3.4 lib/view_mapper/views/paperclip/templates/model.rb
view_mapper-0.3.3 lib/view_mapper/views/paperclip/templates/model.rb
view_mapper-0.3.2 lib/view_mapper/views/paperclip/templates/model.rb
view_mapper-0.3.1 lib/view_mapper/views/paperclip/templates/model.rb
view_mapper-0.3.0 lib/view_mapper/paperclip_templates/model.rb
view_mapper-0.2.0 lib/view_mapper/paperclip_templates/model.rb