Sha256: 3e245de511b53a34a3124935fb573beee9583c158fdae568c01d837584cdef40
Contents?: true
Size: 710 Bytes
Versions: 19
Compression:
Stored size: 710 Bytes
Contents
class Admix::NewsDatagrid include Datagrid scope do News.desc(:date) 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 :published, header: I18n.t('posts.published') do |post| if post.published I18n.t("posts.published_yes") else I18n.t("posts.published_no") end end include Admix::TableActions end
Version data entries
19 entries across 19 versions & 2 rubygems