すみません、うまく質問できません。ルートをまだ知らなくても、ステーションを作成してデータベースに保存できるようにしたいと考えています。モデルを変更するにはどうすればよいですか?
class Station
include DataMapper::Resource
property :id, String, :key => true
has n, :routes, :through => Resource
end
class Route
include DataMapper::Resource
property :id, Serial, :key => true
has n, :stations, :through => Resource
end
rubinius
、data_mapper 1.2
およびを使用してmariadb
います。