Sha256: 7486975e5f4546727522c548e9e51d77d804416f6d0aa7bc26ec3697ef524b32

Contents?: true

Size: 728 Bytes

Versions: 3

Compression:

Stored size: 728 Bytes

Contents

module Troo
  class Comment < Ohm::Model
    include Ohm::DataTypes
    include ModelHelpers

    attribute :text
    attribute :date
    attribute :external_board_id
    attribute :external_card_id
    attribute :external_comment_id
    attribute :external_member_id

    index :date
    index :external_board_id
    index :external_card_id
    index :external_comment_id
    index :external_member_id

    def board
      BoardRetrieval.retrieve(self.external_board_id)
    end

    def card
      CardRetrieval.retrieve(self.external_card_id)
    end

    def member
      MemberRetrieval.retrieve(self.external_member_id)
    end

    def decorator(options = {})
      CommentDecorator.new(self, options)
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
troo-0.0.7 lib/troo/models/comment.rb
troo-0.0.6 lib/troo/models/comment.rb
troo-0.0.5 lib/troo/models/comment.rb