Hi,
I just started using the RailsAdmin and wondering how could I configure the fields of association objects.
Say I have:
class Theater < ActiveRecord::Base
has_and_belongs_to_many :movies
end
class Movie < ActiveRecord::Base
has_and_belongs_to_many :theaters
end
On the Show page of movies, it show all the Movie fields plus the name of the Theater (
theater.name). Then how could I customize the Theater's field that displays in the Movie's show page?
I thought I could try something like:
config.model Movie do
...
...
show do
field :title
field: plot
field: theaters do
field :name
field :class
end
end
end
But turned out, it doesn't work this way. So any suggestions here would be appreciate.