Sha256: 283bd4e50911b9a6d31574736c53ba07f26cc1ca15772d01ad0dc69e47cb77c7

Contents?: true

Size: 596 Bytes

Versions: 6

Compression:

Stored size: 596 Bytes

Contents

if defined?(EffectiveDatatables)
  module Effective
    module Datatables
      class Posts < Effective::Datatable
        default_order :published_at, :desc

        table_column :published_at
        table_column :id, :visible => false

        table_column :title
        table_column :category, :filter => {:type => :select, :values => EffectivePosts.categories }

        table_column :draft

        table_column :actions, :sortable => false, :filter => false, :partial => '/admin/posts/actions'

        def collection
          Effective::Post.all
        end
      end
    end
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
effective_posts-0.4.0 app/models/effective/datatables/posts.rb
effective_posts-0.3.0 app/models/effective/datatables/posts.rb
effective_posts-0.2.6 app/models/effective/datatables/posts.rb
effective_posts-0.2.5 app/models/effective/datatables/posts.rb
effective_posts-0.2.4 app/models/effective/datatables/posts.rb
effective_posts-0.2.3 app/models/effective/datatables/posts.rb