Sha256: 56a41e68eb178f4da64ae3d1037c6758c2bf09d49f897c2e2fc4a1a8d845acf3

Contents?: true

Size: 351 Bytes

Versions: 10

Compression:

Stored size: 351 Bytes

Contents

class User < ActiveRecord::Base
  include TheComments::User
  include TheComments::Commentable

  authenticates_with_sorcery!

  has_many :posts

  # can be replaced to TheCommentsUser as default
  def admin?
    self == User.first
  end

  def comments_admin?
    admin?
  end

  def comments_moderator? comment
    id == comment.holder_id
  end
end

Version data entries

10 entries across 10 versions & 3 rubygems

Version Path
fuck_comments-2.3.4 spec/dummy_app/app/models/user.rb
the_comments_ruby-2.3.4 spec/dummy_app/app/models/user.rb
the_comments_ruby-2.3.3 spec/dummy_app/app/models/user.rb
the_comments-2.3.1 spec/dummy_app/app/models/user.rb
the_comments-2.2.2 spec/dummy_app/app/models/user.rb
the_comments-2.2.1 spec/dummy_app/app/models/user.rb
the_comments-2.2.0 spec/dummy_app/app/models/user.rb
the_comments-2.1.0 spec/dummy_app/app/models/user.rb
the_comments-2.0.1 spec/dummy_app/app/models/user.rb
the_comments-2.0.0 spec/dummy_app/app/models/user.rb