Module: RailsAdminImageManager

Extended by:
ActiveSupport::Autoload
Defined in:
lib/rails_admin_image_manager.rb,
lib/rails_admin_image_manager/engine.rb,
lib/rails_admin_image_manager/version.rb,
app/models/rails_admin_image_manager/tag.rb,
app/models/rails_admin_image_manager/file.rb,
lib/rails_admin_image_manager/has_managed_file.rb,
app/jobs/rails_admin_image_manager/application_job.rb,
app/models/rails_admin_image_manager/application_record.rb,
app/helpers/rails_admin_image_manager/application_helper.rb,
app/controllers/rails_admin_image_manager/home_controller.rb,
app/controllers/rails_admin_image_manager/images_controller.rb,
app/controllers/rails_admin_image_manager/application_controller.rb,
lib/generators/rails_admin_image_manager/install/install_generator.rb

Defined Under Namespace

Modules: ApplicationHelper, Generators, HasManagedFile Classes: ApplicationController, ApplicationJob, ApplicationRecord, Engine, File, HomeController, ImagesController, Tag

Constant Summary collapse

VERSION =
'0.1.34'
@@placeholder_image =

a transparent pixel

"data:image/gif;base64,R0lGODlhAQABAAAAACH5BAEKAAEALAAAAAABAAEAAAICTAEAOw=="
@@hidden_input =
true
@@editor =
{
  imageManagerBrowserUrl: '/admin/image_manager/',
}
@@paginates_per =
15

Class Method Summary collapse

Class Method Details

.options(overrides = {}) ⇒ Object



26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
# File 'lib/rails_admin_image_manager.rb', line 26

def self.options(overrides={})
  # merge in editor settings configured elsewhere

  base = {
    placeholder_image:  self.placeholder_image,
    hidden_input:       self.hidden_input,
    paginates_per:      self.paginates_per
  }
  editor_options = self.editor.merge(base)

  # merge in local overrides
  editor_options.merge!(overrides) if overrides

  editor_options
end