Sha256: e979dc013ff84900198aa8adad5f183dff4ba010f4ce85120fee3ca668bb2d5c

Contents?: true

Size: 743 Bytes

Versions: 20

Compression:

Stored size: 743 Bytes

Contents

ActiveAdmin.register C80Yax::Color, as: 'Color' do

  menu :label => proc{ I18n.t('c80_yax.active_admin.menu.color')},
       :parent => 'x_c80_yax',
       :priority => 8

  permit_params :title,
                :value,
                :skidka,
                :item_ids => []

  config.batch_actions = false
  config.sort_order = 'id_asc'
  before_filter :skip_sidebar!, :only => :index

  index do
    id_column
    column :title
    column :value
    column :skidka
    column :items

    actions
  end

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

    f.inputs 'Свойства' do
      f.input :title
      f.input :value, :as => :color
      f.input :skidka
      f.input :items, :as => :check_boxes
    end

    f.actions
  end

end

Version data entries

20 entries across 20 versions & 1 rubygems

Version Path
c80_yax-0.1.0.25 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.24 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.23 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.22 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.21 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.20 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.18 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.17 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.16 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.15 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.14 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.13 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.12 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.11 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.10 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.9 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.8 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.7 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.6 app/admin/c80_yax/colors.rb
c80_yax-0.1.0.5 app/admin/c80_yax/colors.rb