Skip to content

Commit

Permalink
refinery_images initializer will now be generated with the default va…
Browse files Browse the repository at this point in the history
…lues for the configuration options dynamically
  • Loading branch information
Jamie Winsor committed Sep 7, 2011
1 parent 85d2314 commit 59b6fbf
Show file tree
Hide file tree
Showing 4 changed files with 15 additions and 16 deletions.
15 changes: 0 additions & 15 deletions images/lib/generators/files/config/initializers/refinery_images.rb

This file was deleted.

2 changes: 1 addition & 1 deletion images/lib/generators/images_generator.rb
Expand Up @@ -7,7 +7,7 @@ class ImagesGenerator < ::Refinery::Generators::EngineInstaller
engine_name "images"

def generate_resource_config_files
template "lib/generators/files/config/initializers/refinery_images.rb", destination_path.join("config", "initializers", "refinery_images.rb")
template "lib/generators/templates/config/initializers/refinery_images.rb.erb", destination_path.join("config", "initializers", "refinery_images.rb")
end

end
Expand Down
@@ -0,0 +1,14 @@
Refinery::Images::Options.configure do |config|
# Configures the maximum allowed upload size for an image
# config.max_image_size = <%= Refinery::Images::Options::DEFAULT_MAX_IMAGE_SIZE %>

# Configure how many images per page should be displayed when a dialog is presented that contains images
# config.pages_per_dialog = <%= Refinery::Images::Options::DEFAULT_PAGES_PER_DIALOG %>

# Configure how many images per page should be displayed when a dialog is presented that
# contains images and image resize options
# config.pages_per_dialog_that_have_size_options = <%= Refinery::Images::Options::DEFAULT_PAGES_PER_DIALOG_THAT_HAVE_SIZE_OPTIONS %>

# Configure how many images per page should be displayed in the list of images in the admin area
# config.pages_per_admin_index = <%= Refinery::Images::Options::DEFAULT_PAGES_PER_ADMIN_INDEX %>
end
File renamed without changes.

0 comments on commit 59b6fbf

Please sign in to comment.