I have started to use Rails_Admin gem and it is great. However, there is one issue. I am using Mongoid and I have created my models:
class Client
include Mongoid::Document
field :email, type: String
has_many :favourites, dependent: :destroy
end
class Service
include Mongoid::Document
field :name, type: String
has_many :favourites, dependent: :destroy
end
class Favourite
include Mongoid::Document
belongs_to :client
belongs_to :service
end
I have created some data by using seed.rb. When I open my admin page and try to create new Client, after Clients attribute fields, it shows me multiselect form to add Favourites and shows me Favourites of all other Clients.
How to remove this from creation form? I have read that I need to add inverse_of for all my classes associations, but it is not removing them.