Method: CometArchiveGenerator#has_many

Defined in:
lib/metarecord/generators/comet/archive_generator.rb

#has_many(type, name, options = {}) ⇒ Object



88
89
90
91
92
93
94
95
96
# File 'lib/metarecord/generators/comet/archive_generator.rb', line 88

def has_many type, name, options = {}
  return if should_skip_on_client? options
  singular_name = get_singular_name name
  if options[:joined] != false
    @src += " & #{name}"
  else
    @src += " & #{singular_name}_ids"
  end
end