Module: RailsAdminComments

Defined in:
lib/rails_admin_comments.rb,
lib/rails_admin_comments/engine.rb,
lib/rails_admin_comments/helper.rb,
lib/rails_admin_comments/version.rb,
lib/rails_admin_comments/configuration.rb,
app/models/rails_admin_comments/comment.rb,
app/models/rails_admin_comments/comment.rb,
app/models/rails_admin_comments/model_comment.rb,
app/models/rails_admin_comments/model_comment.rb,
lib/rails_admin_comments/models/mongoid/comments.rb,
app/models/concerns/rails_admin_comments/commentable.rb,
lib/rails_admin_comments/models/mongoid/model_comments.rb,
app/models/concerns/rails_admin_comments/model_commentable.rb

Defined Under Namespace

Modules: Commentable, Comments, Helper, ModelCommentable, ModelComments Classes: Comment, Configuration, Engine, ModelComment

Constant Summary collapse

VERSION =
"0.3.0".freeze

Class Method Summary collapse

Class Method Details

.active_record?Boolean

Returns:

  • (Boolean)


31
32
33
# File 'lib/rails_admin_comments.rb', line 31

def active_record?
  orm == :active_record
end

.mongoid?Boolean

Returns:

  • (Boolean)


27
28
29
# File 'lib/rails_admin_comments.rb', line 27

def mongoid?
  orm == :mongoid
end

.ormObject



18
19
20
21
22
23
24
25
# File 'lib/rails_admin_comments.rb', line 18

def orm
  :mongoid
  # if defined?(::Mongoid)
  #   :mongoid
  # else
  #   :active_record
  # end
end