Sha256: 0e21b5e93f78ec95c6e799dc741d2256f30b06189b9ca14f8986719800c8d603

Contents?: true

Size: 613 Bytes

Versions: 11

Compression:

Stored size: 613 Bytes

Contents

module Locomotive
  class ContentTypePresenter < BasePresenter

    delegate :name, :description, :slug, :order_by, :order_direction, :label_field_name, :group_by_field_id, :public_submission_accounts, :to => :source

    def entries_custom_fields
      self.source.ordered_entries_custom_fields.collect(&:as_json)
    end

    def klass_name
      self.source.klass_with_custom_fields(:entries).to_s
    end

    def included_methods
      super + %w(name description slug order_by order_direction label_field_name group_by_field_id public_submission_accounts entries_custom_fields klass_name)
    end

  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
locomotive_cms-2.0.0.rc12 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc11 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc10 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc9 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc8 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc7 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc6 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc5 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc4 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc2 app/presenters/locomotive/content_type_presenter.rb
locomotive_cms-2.0.0.rc1 app/presenters/locomotive/content_type_presenter.rb