Sha256: 3c8b1bbf25c4d6380fbe3047943725bd40b07528b3e7f55a503874bf5e577eee

Contents?: true

Size: 930 Bytes

Versions: 4

Compression:

Stored size: 930 Bytes

Contents

class CommentPresenter < Carnival::BaseAdminPresenter
  field :id,
    actions: [:index, :show, :csv, :pdf],
    searchable: true,
    sortable: true,
    advanced_search: {operator: :equal}
  field :comment,
    actions: [:index, :show, :csv, :pdf],
    searchable: true,
    sortable: true,
    advanced_search: {operator: :like}
  field :post_id,
    actions: [:index, :show, :csv, :pdf],
    searchable: true,
    sortable: true,
    advanced_search: {operator: :equal}    
  field :approved,
    actions: [:index, :edit, :show, :csv, :pdf],
    searchable: true,
    sortable: true,
    advanced_search: {operator: :equal}
  field :updated_at,
    actions: [:index, :show, :csv, :pdf],
    sortable: true,
    advanced_search: {operator: :between}
  field :created_at,
    actions: [:index, :show, :csv, :pdf],
    sortable: true,
    advanced_search: {operator: :between}

  action :edit
  action :show
  action :destroy
end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
carnival-0.1.3 test/carnival-sample-application/app/presenters/comment_presenter.rb
carnival-0.1.2 test/carnival-sample-application/app/presenters/comment_presenter.rb
carnival-0.1.1 test/carnival-sample-application/app/presenters/comment_presenter.rb
carnival-0.1.0 test/carnival-sample-application/app/presenters/comment_presenter.rb