Sha256: 726e03b8c0a224af1f70c1c5727409634bf0ccda6c6afe9cd5126d1dfbc88831

Contents?: true

Size: 426 Bytes

Versions: 1

Compression:

Stored size: 426 Bytes

Contents

module SimpleForum
  class Moderatorship < ::ActiveRecord::Base
    belongs_to :forum,
               :class_name => "SimpleForum::Forum"

    belongs_to :user,
               :class_name => instance_eval(&AbstractAuth.invoke(:user_class)).name

    validates :forum, :user, :presence => true
    validates :user_id, :uniqueness => {:scope => :forum_id, :allow_nil => true}

    attr_accessible :forum_id, :user_id

  end
end

Version data entries

1 entries across 1 versions & 1 rubygems

Version Path
simple_forum-0.0.2 app/models/simple_forum/moderatorship.rb