ActiveAdmin customizing the form for belongs_to

Viewed 4370

I have these associations:

class Course < ActiveRecord::Base
  has_many :signup
  has_many :user, :through => :signup

  accepts_nested_attributes_for :signup
end

class User < ActiveRecord::Base
  has_many :signup
  has_many :course, :through => :signup

  accepts_nested_attributes_for :signup
end

class Signup < ActiveRecord::Base
  belongs_to :course
  belongs_to :user
end

Now, I would like to customize the ActiveAdmin form for "Signup", so it shows the title of the courses and the name of the users as a select and not as a textfield.

The default form already does that, however I need to customize the form further and I can't reproduce the default form.

1 Answers
Related