Sha256: 525118de4a2508a99ac40522aaed2458787439f5bc92b4766033d6d97501b60d

Contents?: true

Size: 522 Bytes

Versions: 11

Compression:

Stored size: 522 Bytes

Contents

if defined?(ActiveAdmin)
  ActiveAdmin.register Lentil::Flag do
    actions :index

    filter :image, :as => :select, :collection => proc { Lentil::Image.joins(:flags).group("lentil_images.id").having("count(lentil_flags.id) > 0").map(&:id) }

    config.batch_actions = false

    index do
      column "Image" do |flag|
        link_to(image_tag(flag.image.image_url, :class => "moderation_thumbnail"), admin_lentil_image_path(flag.image),)
      end
      column :created_at
      column :updated_at
    end
  end
end

Version data entries

11 entries across 11 versions & 1 rubygems

Version Path
lentil-1.0.5 lib/lentil/admin/flags.rb
lentil-1.0.4 lib/lentil/admin/flags.rb
lentil-1.0.3 lib/lentil/admin/flags.rb
lentil-1.0.2 lib/lentil/admin/flags.rb
lentil-1.0.1 lib/lentil/admin/flags.rb
lentil-1.0.0 lib/lentil/admin/flags.rb
lentil-0.9.1 lib/lentil/admin/flags.rb
lentil-0.9.0 lib/lentil/admin/flags.rb
lentil-0.8.0 lib/lentil/admin/flags.rb
lentil-0.7.1 lib/lentil/admin/flags.rb
lentil-0.6.0 lib/lentil/admin/flags.rb