Sha256: 5c5efb74e1d6c9b0da6941ba43d9020f52067bb3d7e27abd8f6706a50387af8f

Contents?: true

Size: 407 Bytes

Versions: 27

Compression:

Stored size: 407 Bytes

Contents

module Spina
  class AttachmentCollection < ActiveRecord::Base

    has_one :page_part, as: :page_partable
    has_and_belongs_to_many :attachments, join_table: 'spina_attachment_collections_attachments'

    attr_reader :attachment_tokens    
    accepts_nested_attributes_for :attachments, allow_destroy: true

    def attachment_tokens=(ids)
      self.attachment_ids = ids.split(",")
    end

  end
end

Version data entries

27 entries across 27 versions & 1 rubygems

Version Path
spina-0.9.0 app/models/spina/attachment_collection.rb
spina-0.8.3 app/models/spina/attachment_collection.rb
spina-0.8.2 app/models/spina/attachment_collection.rb
spina-0.8.1 app/models/spina/attachment_collection.rb
spina-0.8.0 app/models/spina/attachment_collection.rb
spina-0.7.3 app/models/spina/attachment_collection.rb
spina-0.7.2 app/models/spina/attachment_collection.rb
spina-0.7.0 app/models/spina/attachment_collection.rb
spina-0.6.29 app/models/spina/attachment_collection.rb
spina-0.6.28 app/models/spina/attachment_collection.rb
spina-0.6.27 app/models/spina/attachment_collection.rb
spina-0.6.26 app/models/spina/attachment_collection.rb
spina-0.6.25 app/models/spina/attachment_collection.rb
spina-0.6.24 app/models/spina/attachment_collection.rb
spina-0.6.23 app/models/spina/attachment_collection.rb
spina-0.6.22 app/models/spina/attachment_collection.rb
spina-0.6.21 app/models/spina/attachment_collection.rb
spina-0.6.20 app/models/spina/attachment_collection.rb
spina-0.6.19 app/models/spina/attachment_collection.rb
spina-0.6.18 app/models/spina/attachment_collection.rb