Sha256: 3f0ca308eca39d3dbdf82ffc0d339aa7cba64e75270b96a527fd1937c4685f3f

Contents?: true

Size: 1.39 KB

Versions: 6

Compression:

Stored size: 1.39 KB

Contents

Enjoy.rails_admin_configure do |config|
  config.action_visible_for :nested_set, 'Enjoy::Gallery::Gallery'
  config.action_visible_for :nested_set, 'Enjoy::Gallery::Image'

  if defined?(RailsAdminComments)
    config.action_visible_for :comments, 'Enjoy::Gallery::Gallery'
    config.action_visible_for :comments, 'Enjoy::Gallery::Image'

    config.action_visible_for :model_comments, 'Enjoy::Gallery::Gallery'
    config.action_visible_for :model_comments, 'Enjoy::Gallery::Image'
  end

  if defined?(RailsAdminMultipleFileUpload)
    if true or Enjoy::Catalog.active_record?
      config.action_visible_for :multiple_file_upload, 'Enjoy::Gallery::Gallery'
    end
  end
end

Enjoy.configure do |config|
  config.ability_manager_config << {
    method: :can,
    model: Enjoy::Gallery::Gallery,
    actions: [:edit, :update, :new]
  }
  config.ability_manager_config << {
    method: :can,
    model: Enjoy::Gallery::Image,
    actions: [:edit, :update, :new, :nested_set]
  }
  config.ability_admin_config << {
    method: :can,
    model: Enjoy::Gallery::Gallery,
    actions: :manage
  }
  config.ability_admin_config << {
    method: :can,
    model: Enjoy::Gallery::Image,
    actions: :manage
  }
end

if defined?(RailsAdmin)
  RailsAdmin.config do |config|
    config.excluded_models ||= []
    config.excluded_models << [
      'Enjoy::Gallery::EmbeddedImage'
    ]
    config.excluded_models.flatten!
  end
end

Version data entries

6 entries across 6 versions & 1 rubygems

Version Path
enjoy_cms_gallery-0.4.1 config/initializers/enjoy_rails_admin.rb
enjoy_cms_gallery-0.4.0.2 config/initializers/enjoy_rails_admin.rb
enjoy_cms_gallery-0.4.0.1 config/initializers/enjoy_rails_admin.rb
enjoy_cms_gallery-0.4.0 config/initializers/enjoy_rails_admin.rb
enjoy_cms_gallery-0.4.0.beta3 config/initializers/enjoy_rails_admin.rb
enjoy_cms_gallery-0.4.0.beta1 config/initializers/enjoy_rails_admin.rb