Skip to content

Latest commit

 

History

History
20 lines (16 loc) · 471 Bytes

File metadata and controls

20 lines (16 loc) · 471 Bytes

Synopsis:

class Comment < ActiveRecord::Base
  belongs_to :commentable, :polymorphic => true, :inverse_of => :comments

  rails_admin do
    configure :commentable do
      # configuration here
    end
  end
end

# for info
class Team < ActiveRecord::Base
  has_many :comments, :as => :commentable, :inverse_of => :commentable
end

More here