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 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_multiple_options, #set_option

Instance Method Details

#comment_userObject

return the owner of this comment



35
36
37
# File 'app/models/camaleon_cms/post_comment.rb', line 35

def comment_user
  self.user
end

#is_approved?Boolean

check if this comments is already approved

Returns:

  • (Boolean)


40
41
42
# File 'app/models/camaleon_cms/post_comment.rb', line 40

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