app/models/mongoid_forums/group.rb in ack-mongoid-forums-1.0.5 vs app/models/mongoid_forums/group.rb in ack-mongoid-forums-1.0.6

- old
+ new

@@ -1,15 +1,27 @@ module MongoidForums class Group include Mongoid::Document + include ::Mongoid::Timestamps + include Enableable + validates :name, :moderator, :presence => true field :name, type: String field :moderator, type: Boolean - field :members, type: Array, default: [] + has_and_belongs_to_many :members, class_name: MongoidForums.user_class.to_s, inverse_of: nil def to_s name + end + + rails_admin do + field :enabled, :toggle + field :name + field :created_at + field :updated_at + field :moderator + field :members end end end