Sha256: 7583a0d8d81ed884ecf0d5f351b62f2c72cab67f5ecbab2f41016c3bcdfb8e6c

Contents?: true

Size: 668 Bytes

Versions: 30

Compression:

Stored size: 668 Bytes

Contents

ActiveAdmin.register ActiveAdmin::Comment, :as => 'Comment' do

  menu label: 'Комментарии',
       :if => proc { current_admin_user.can_view_comments? },
       :priority => 12

  batch_action :destroy, false

  config.clear_action_items!

  index do
    # selectable_column
    id_column
    column :author
    column :resource
    column :body
    column :created_at
  end

  filter :author_id,
         :label => 'Автор',
         :as => :select,
         :collection => -> { AdminUser.all.map { |u| ["#{u.email}", u.id] } },
         :input_html => {:class => 'selectpicker', 'data-size' => "10", 'data-width' => '100%'}
  filter :created_at

end

Version data entries

30 entries across 30 versions & 1 rubygems

Version Path
c80_estate-0.1.0.39 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.38 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.37 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.36 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.35 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.34 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.33 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.32 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.31 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.30 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.29 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.28 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.27 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.26 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.25 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.24 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.23 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.22 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.21 app/admin/c80_estate/comments.rb
c80_estate-0.1.0.20 app/admin/c80_estate/comments.rb