Sha256: 47d364597018d1fe32c0be0f0db02f47da9d17f6f9353fe83436fdd362cad50d

Contents?: true

Size: 408 Bytes

Versions: 1

Compression:

Stored size: 408 Bytes

Contents

class Sharing < ActiveRecord::Base

  self.table_name = "sharings"
  self.primary_key = 'id'

  has_one :acceptance, :inverse_of => :sharing
  has_many :connections, :dependent => :delete_all, foreign_key: "sharing_id"
  belongs_to :wishlist, :inverse_of => :sharings, foreign_key: "wishlist_id"
  belongs_to :request_showing, :foreign_key => "request_id"

  def describe_id
  	"Sharing ##{id}"
  end
  
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
civic311_test3-0.0.2 app/models/sharing.rb