我在 Rails 4 上玩 RailsAdmin。我有非常简单的案例(两个模型,Event 属于 Idea)。
代码:
class Idea < ActiveRecord::Base
end
class Event < ActiveRecord::Base
belongs_to :idea
end
架构
create_table "events", force: true do |t|
t.string "location"
t.integer "idea_id"
t.datetime "created_at"
t.datetime "updated_at"
end
add_index "events", ["idea_id"], name: "index_events_on_idea_id"
create_table "ideas", force: true do |t|
t.string "title"
t.text "descrption"
t.datetime "created_at"
t.datetime "updated_at"
end
我看到了这一点。而且我不明白为什么它同时显示下拉选择想法和附加数字编辑框?
.