Sha256: be67a617db62fc9c3a71ad0ce7f4e99b739251bca65faf0221cf34d78fab36f8
Contents?: true
Size: 870 Bytes
Versions: 7
Compression:
Stored size: 870 Bytes
Contents
ActiveAdmin.register C80NewsTz::RLive, :as => 'RLive' do menu :label => "Рекламодатель активный", :parent => 'Содержимое сайта' before_filter :skip_sidebar!, :only => :index permit_params :r_advertiser_ids => [] index do column :r_advertisers do |loc| # нарисуем список list_items = ((loc.r_advertisers.map { |p| "<li>#{ p.title }</li>" }).join("")).html_safe "<ul>#{list_items}</ul>".html_safe end actions end form(:html => {:multipart => true}) do |f| f.inputs "Свойства" do f.input :r_advertisers, :as => :select, :input_html => {:multiple => false}, :include_blank => true, :member_label => Proc.new { |p| p.title } end f.actions end end
Version data entries
7 entries across 7 versions & 1 rubygems