Sha256: 716a5ad756395768c180ed9c8a340920ca43fe2e31727c16a6f14d25dc105d11
Contents?: true
Size: 389 Bytes
Versions: 1
Compression:
Stored size: 389 Bytes
Contents
class ArModel # TODO: move all the activerecord-specific stuff from rails into here. # returns the rails string defining an association. Supports belongs_to, has_many, hmt def ArModel.association_string(assoc_name, assoc_hash) option_str = assoc_hash[:through] ? ", :through => :#{assoc_hash[:through].p}" : "" "#{assoc_hash[:type]} :#{assoc_name + option_str}" end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
mattknox-goaloc-0.4.7 | lib/goaloc/generators/ar_model.rb |