Sha256: 377e7a8ce40a2d7102cc6b4a45d3ac9d8fd2de944f3fd49d60a693379244462b

Contents?: true

Size: 626 Bytes

Versions: 10

Compression:

Stored size: 626 Bytes

Contents

module RailsConnector
  # This module is included if the <tt>:comments</tt> addon is
  # enabled:
  #     RailsConnector::Configuration.enable(:comments)
  module Commentable
    # returns all Comments for this Obj.
    def comments
      Comment.where(:obj_id => id).order("created_at")
    end

    # Returns +true+ by default.
    # Implement your own conditions by overwriting this method in your {Obj}.
    def allow_comments?
      true
    end

    # Returns +true+ by default.
    # Implement your own conditions by overwriting this method in your {Obj}.
    def allow_anonymous_comments?
      true
    end
  end
end

Version data entries

10 entries across 10 versions & 1 rubygems

Version Path
infopark_rails_connector-6.9.1.3.22208381 lib/rails_connector/commentable.rb
infopark_rails_connector-6.9.0.3.197272233 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.174.51542603 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.115.227021242 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.73.75172665 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.2.153416031 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.67.110847540 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.3.1.23895778 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.2.36.82613853 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.2.7.128454143 lib/rails_connector/commentable.rb