ruby on rails - RailsAdmin doesn't correctly handles belongs_to -


i playing railsadmin on rails 4. , have simple case (two models, event belongs idea).

code:

class idea < activerecord::base end  class event < activerecord::base   belongs_to :idea  end 

schema

  create_table "events", force: true |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 |t|     t.string   "title"     t.text     "descrption"     t.datetime "created_at"     t.datetime "updated_at"   end 

and seeing this. , can't figure out why show both drop down choose idea , additional numeric editbox?

enter image description here.

railsadmin heavily relies on relationships dynamically generate forms. aside that, have encountered other issues down line if didn't map relationships both models.

class idea < activerecord::base   # missing   has_many :events end  class event < activerecord::base   belongs_to :idea end 

Comments

Popular posts from this blog

Export Excel workseet into txt file using vba - (text and numbers with formulas) -

wordpress - (T_ENDFOREACH) php error -

Using django-mptt to get only the categories that have items -