Sha256: c499554769a5ae46cccaf2831d4653c02e458be067b6ca381372cba18471969e
Contents?: true
Size: 490 Bytes
Versions: 5
Compression:
Stored size: 490 Bytes
Contents
module OneAssociation def search_terms_set(record) return [] unless include_in_search_keywords? record.get(name).try(:search_terms) || [] end def before_destroy(record) if @options['destroy'] == true record.get(name).try(:destroy) end end def typecast(value, record) return default if value.blank? associated(value, record) end private def clear(store, record) unassociate(associated(store, record), store, record) end end
Version data entries
5 entries across 5 versions & 1 rubygems