Sha256: 77f515a571c2e76c6c8de7abaa6de7ddc9e8a77f046bf72a222ab7b059f73915

Contents?: true

Size: 646 Bytes

Versions: 14

Compression:

Stored size: 646 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 {ObjExtensions}.
    def allow_comments?
      true
    end

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

Version data entries

14 entries across 14 versions & 1 rubygems

Version Path
infopark_rails_connector-6.8.1.26.236500544 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.1 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.539.93842523 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.529.114081979 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.518.30999728 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.515.34928522 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.498.46559598 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.480.261594408 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.444.171626367 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.406.131718077 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.356.19698103 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.348.160665197 lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.328.4a753fc lib/rails_connector/commentable.rb
infopark_rails_connector-6.8.0.322.c003f11 lib/rails_connector/commentable.rb