Class: GoogleSpreadsheets::LinkRelations::Builder::LinksToMany

Inherits:
ActiveResource::Associations::Builder::Association
  • Object
show all
Defined in:
lib/google_spreadsheets/link_relations.rb

Instance Method Summary collapse

Instance Method Details

#buildObject



22
23
24
25
26
27
# File 'lib/google_spreadsheets/link_relations.rb', line 22

def build
  validate_options
  model.create_reflection(self.class.macro, name, options).tap do |reflection|
    model.defines_links_to_many_finder_method(reflection.name, reflection.options[:rel], reflection.klass)
  end
end