Sha256: fc6a7aa706d49bafa5abad722dcacf0f145ff6108cb7ab2bc677dc2c9e761527

Contents?: true

Size: 718 Bytes

Versions: 2

Compression:

Stored size: 718 Bytes

Contents

ActiveAdmin.register C80Features::Para, :as => 'Para' do

  before_filter :skip_sidebar!, :only => :index

  menu :label => 'Преимущества'

  config.sort_order = 'id_asc'

  permit_params :title,
                :content,
                :image

  index do
    selectable_column
    column :image do |ab|
      image_tag("#{ab.image.thumb_preview.url}")
    end
    column :title
    column :content do |about|
      about.content.html_safe
    end
    actions
  end

  form(:html => {:multipart => true}) do |f|

    f.inputs 'Свойства' do
      f.input :image, :hint => image_tag("#{f.object.image}")
      f.input :title
      f.input :content, :as => :ckeditor
    end

    f.actions
  end

end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
c80_features-0.1.3.2 app/admin/c80_features/paras.rb
c80_features-0.1.3.1 app/admin/c80_features/paras.rb