Sha256: 93631ddf8cc0ce09252e130f96ed894a53ae26a594c64e31d6dbeb4e31b053e7
Contents?: true
Size: 1001 Bytes
Versions: 6
Compression:
Stored size: 1001 Bytes
Contents
ActiveAdmin.register C80NewsTz::Banner01, :as => 'Banner01' do menu :label => "Рекламный блок №1", :parent => 'Баннеры' permit_params :title, :image, :href, :is_active config.sort_order = 'title_asc' filter :title filter :href filter :is_active # controller do # cache_sweeper :suit_sweeper, :only => [:update,:create,:destroy] # end index do selectable_column id_column column :title column :image do |a| if a.image.present? "#{image_tag("#{a.image.thumb_preview.url}")}".html_safe end end column :href column :is_active column :shown column :clicks actions end form(:html => {:multipart => true}) do |f| f.inputs "Свойства" do f.input :title f.input :href f.input :image, :hint => "#{image_tag("#{f.object.image.thumb_preview.url}")}".html_safe f.input :is_active end f.actions end end
Version data entries
6 entries across 6 versions & 1 rubygems