Sha256: fcdd5ce561dd0f3c007dc3e280734511abac67cbcea1f5ffddea641888b5bfb8
Contents?: true
Size: 487 Bytes
Versions: 4
Compression:
Stored size: 487 Bytes
Contents
class Person < ActiveRecord::Base include Carnival::ModelHelper has_many :photos has_many :addresses has_many :phones, as: :phoneable accepts_nested_attributes_for :photos, :reject_if => lambda { |a| a[:image].blank? }, :allow_destroy => true accepts_nested_attributes_for :addresses, :reject_if => lambda { |a| a[:address].blank? }, :allow_destroy => true accepts_nested_attributes_for :phones, :reject_if => lambda { |a| a[:number].blank? }, :allow_destroy => true end
Version data entries
4 entries across 4 versions & 1 rubygems