Sha256: 4085110a09179cede9bc250ddfcb6d71179b5b1657d1ed7851d3d019d942db9d

Contents?: true

Size: 709 Bytes

Versions: 31

Compression:

Stored size: 709 Bytes

Contents

require 'roar/representer/json'
require 'billit_representers/representers/table_representer'

module Billit
  module TableCollectionRepresenter
    include Roar::Representer::JSON
    include Roar::Representer::Feature::Hypermedia

    include Roar::Representer::JSON::HAL

    module Initializer
      def initialize
        extend Billit::TableCollectionRepresenter
        extend Roar::Representer::Feature::Client
        super
      end
    end

    def self.included(klass)
      klass.send :prepend, Initializer
      klass.send :include, Roar::Representer::Feature::HttpVerbs
    end

    collection :tables, :extend => TableRepresenter, :class => Table

    def tables
      collect
    end
  end
end

Version data entries

31 entries across 31 versions & 1 rubygems

Version Path
billit_representers-0.9.10 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.9 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.8 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.7 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.6 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.5 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.4 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.3 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.2 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.1 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.9.0 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.12 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.11 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.10 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.9 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.8 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.7 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.6 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.5 lib/billit_representers/representers/table_collection_representer.rb
billit_representers-0.8.4 lib/billit_representers/representers/table_collection_representer.rb