Sha256: b79c9760d46799ef913b5cd2072c123a6f4962b526615a314b5505ce6abc3656
Contents?: true
Size: 685 Bytes
Versions: 17
Compression:
Stored size: 685 Bytes
Contents
class Admix::AlbumsDatagrid include Datagrid scope do Album.desc(:date) end filter :name, :string filter :date do |value| value.to_s(:created_at) end column :name, header: I18n.t('albums.name') column :date, header: I18n.t('albums.date') do |album| album.date.strftime("%d/%m/%Y") #album.date.to_s(:created_at) end column :photos_quantity, header: I18n.t('albums.photos_quantity') do |album| album.photos.count end column :published, header: I18n.t('albums.published') do |album| if album.published I18n.t("albums.published_yes") else I18n.t("albums.published_no") end end include Admix::TableActions end
Version data entries
17 entries across 17 versions & 2 rubygems