Sha256: 04401c2e338273493d4c88aff239e90afe5e6ddeab21be9c91c6bdffcc046b39
Contents?: true
Size: 547 Bytes
Versions: 12
Compression:
Stored size: 547 Bytes
Contents
class RestModel class Relation module Builder def relation(name, options = {}) key Relation.new(name, options) end def has_one(name, options = {}) options.merge!(many: false, has: true) relation(name, options) end def has_many(name, options = {}) options.merge!(many: true, has: true) relation(name, options) end def belongs_to(name, options = {}) options.merge!(many: false, has: false) relation(name, options) end end end end
Version data entries
12 entries across 12 versions & 1 rubygems