Sha256: 9e0a61ebe30732865988cfb9527f74caec524316b98dfd485e4012e1b92acf51
Contents?: true
Size: 618 Bytes
Versions: 4
Compression:
Stored size: 618 Bytes
Contents
class Admix::NewsDatagrid include Datagrid scope do News.order('id DESC') end filter :date do |value| value.to_s(:created_at) end column :title, header: I18n.t('posts.title') column :date, header: I18n.t('posts.date') do |post| post.date.strftime("%d/%m/%Y") #post.date.to_s(:created_at) end column :image, header: I18n.t('posts.image'), html: true do |post| if post.image? image_tag post.image.url(:small_thumb) else "--" end end column :status, header: I18n.t('posts.status') do |post| post.status.text end include Admix::TableActions end
Version data entries
4 entries across 4 versions & 2 rubygems