Class: CamaleonCms::PostComment

Inherits:
ActiveRecord::Base
  • Object
show all
Includes:
Metas
Defined in:
app/models/camaleon_cms/post_comment.rb

Overview

Camaleon CMS is a content management system

Copyright (C) 2015 by Owen Peredo Diaz
Email: [email protected]
This program is free software: you can redistribute it and/or modify   it under the terms of the GNU Affero General Public License as  published by the Free Software Foundation, either version 3 of the  License, or (at your option) any later version.
This program is distributed in the hope that it will be useful,  but WITHOUT ANY WARRANTY; without even the implied warranty of  MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
See the  GNU Affero General Public License (GPLv3) for more details.

Instance Attribute Summary collapse

Instance Method Summary collapse

Methods included from Metas

#delete_meta, #delete_option, #fix_save_metas_options_no_changed, #get_meta, #get_option, #options, #save_metas_options, #save_metas_options_skip, #set_meta, #set_metas, #set_multiple_options, #set_option

Instance Attribute Details

#is_anonymousObject

Returns the value of attribute is_anonymous.



14
15
16
# File 'app/models/camaleon_cms/post_comment.rb', line 14

def is_anonymous
  @is_anonymous
end

Instance Method Details

#comment_userObject

return the owner of this comment



37
38
39
# File 'app/models/camaleon_cms/post_comment.rb', line 37

def comment_user
  self.user
end

#is_approved?Boolean

check if this comments is already approved

Returns:

  • (Boolean)


42
43
44
# File 'app/models/camaleon_cms/post_comment.rb', line 42

def is_approved?
  self.approved == 'approved'
end