Sha256: 4bdd5bff36aa8844746dd48bf6f2c7c805fa8716e328cf1f02f15bfd3a552503

Contents?: true

Size: 1.15 KB

Versions: 10

Compression:

Stored size: 1.15 KB

Contents

class Comment < ActiveRecord::Base
  include TheComments::Comment
  # ---------------------------------------------------
  # Define comment's avatar url
  # Usually we use Comment#user (owner of comment) to define avatar
  # @blog.comments.includes(:user) <= use includes(:user) to decrease queries count
  # comment#user.avatar_url
  # ---------------------------------------------------

  # ---------------------------------------------------
  # Simple way to define avatar url

  # def avatar_url
  #   hash = Digest::MD5.hexdigest self.id.to_s
  #   "http://www.gravatar.com/avatar/#{hash}?s=30&d=identicon"
  # end
  # ---------------------------------------------------

  # ---------------------------------------------------
  # Define your filters for content
  # Expample for: gem 'RedCloth', gem 'sanitize'
  # your personal SmilesProcessor

  # def prepare_content
  #   text = self.raw_content
  #   text = RedCloth.new(text).to_html
  #   text = SmilesProcessor.new(text)
  #   text = Sanitize.clean(text, Sanitize::Config::RELAXED)
  #   self.content = text
  # end
  # ---------------------------------------------------
end

Version data entries

10 entries across 10 versions & 3 rubygems

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