Sha256: f44a2d18d5ea56aaeac8d633f0eb968fd3881f36214d2dc67e5ffb9282edc525

Contents?: true

Size: 279 Bytes

Versions: 5

Compression:

Stored size: 279 Bytes

Contents

class OneStoreAssociation < Association
  include StoreAssociation
  include OneAssociation
  
  def default_input_type
    :store_one
  end
  
  def untypecast(value, record)
    value.respond_to?(:id) ? value.id : nil
  end
end

Field::TYPES['one_store'] = OneStoreAssociation

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
yodel-0.0.7 lib/yodel/models/core/associations/store/one_store_association.rb
yodel-0.0.4 lib/yodel/models/core/associations/store/one_store_association.rb
yodel-0.0.3 lib/yodel/models/core/associations/store/one_store_association.rb
yodel-0.0.2 lib/yodel/models/core/associations/store/one_store_association.rb
yodel-0.0.1 lib/yodel/models/core/associations/store/one_store_association.rb