有问题,我不能选择地区。我有三个模型,spot => city,city => region。在模型现场没有现场区域。
class Spot < ActiveRecord::Base
belongs_to :city
end
class City < ActiveRecord::Base
belongs_to :region
end
class Region < ActiveRecord::Base
end
= simple_form_for(@spot, :url => admin_spot_index_path) do |f|
= f.error_notification
= f.association :city, :collection => City.all, label: false
#TODO
Select region ??
如何以简单的形式表示选择区域?