Sha256: 60e30aa50264fbfe84ae817872cabbe91794ebe4879823169ec5b388738033d3

Contents?: true

Size: 643 Bytes

Versions: 6

Compression:

Stored size: 643 Bytes

Contents

if defined?(EffectiveDatatables)
  module Effective
    module Datatables
      class Posts < Effective::Datatable
        datatable do
          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'
        end

        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.6 app/models/effective/datatables/posts.rb
effective_posts-0.4.5 app/models/effective/datatables/posts.rb
effective_posts-0.4.4 app/models/effective/datatables/posts.rb
effective_posts-0.4.3 app/models/effective/datatables/posts.rb
effective_posts-0.4.2 app/models/effective/datatables/posts.rb
effective_posts-0.4.1 app/models/effective/datatables/posts.rb