Skip to content

Instantly share code, notes, and snippets.

@fgrehm fgrehm/gist:212121
Created Oct 16, 2009

What would you like to do?, "exhibits") do |exhibits, type|
exhibits.field :id, type.serial
exhibits.field :name, type.string(200)
exhibits.field :zoo_id, type.integer
exhibits.key :id
end, 'zoo_keepers') do |zoo_keepers, type|
zoo_keepers.field :id, type.serial
zoo_keepers.field :name, type.string(200)
zoo_keepers.key :id
zoo_keepers.many_to_many(:exhibits, Exhibit, 'exhibits_zoo_keepers')
# this is what i thought for ManyToMany#load but there's no relation between Exhibits -> ZooKeeper
# only Exhibits <- ZooKeeper
orm.all(Exhibits) do |exhibits|
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.