Class: CamaleonCms::PostComment

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

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_option, #set_options

Instance Attribute Details

#is_anonymousObject

attr_accessible :user_id, :post_id, :content, :author, :author_email, :author_url, :author_IP, :approved, :agent, :agent, :typee, :comment_parent, :is_anonymous



7
8
9
# File 'app/models/camaleon_cms/post_comment.rb', line 7

def is_anonymous
  @is_anonymous
end

Instance Method Details

#comment_userObject

return the owner of this comment



30
31
32
# File 'app/models/camaleon_cms/post_comment.rb', line 30

def comment_user
  user
end

#is_approved?Boolean

check if this comments is already approved

Returns:

  • (Boolean)


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

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