lib/papermill/papermill_module.rb in papermill-0.9.0 vs lib/papermill/papermill_module.rb in papermill-0.10.0
- old
+ new
@@ -13,12 +13,10 @@
# the rest is very optionnal and will "cascade" nicely
:width => 100, # Recommended if :gallery[:width] is nil
:height => 100, # Recommended if :gallery[:height] is nil
# set :width OR :height to nil to use aspect_ratio value. Remember that 4/3 == 1 => Use : 4.0/3
:aspect_ratio => nil,
- :max_width => 1000,
- :max_height => 1000,
# You can override computed ImageMagick transformation strings that defaults to "#{:width}x#{:height}>"
# Note that this is required if PAPERMILL_DEFAULTS[:alias_only] is true
:style => nil,
# set to false if you don't want inline CSS
:inline_css => true
@@ -38,13 +36,13 @@
:autogrow => false # sets a min-height instead of height for the gallery
},
# options passed on to SWFUpload. To remove an option when overriding, set it to nil.
:swfupload => {
# !!! Will only work if the swf file comes from the server to where the files are sent. (Flash same origin security policy)
- :flash_url => '/flashs/swfupload.swf',
+ :flash_url => '/papermill/swfupload.swf',
# You can use upload-blank.png with your own wording or upload.png with default "upload" wording (looks nicer)
- :button_image_url => '/images/papermill/upload-blank.png',
+ :button_image_url => '/papermill/images/upload-blank.png',
:button_width => 61,
:button_height => 22,
# Wording and CSS processed through an Adobe Flash styler. Result is terrible. Feel free to put a CSS button overlayed directly on the SWF button. See swfupload website.
:button_text => %{<span class="button-text">#{I18n.t("upload-button-wording", :scope => :papermill)}</span>},
:button_text_style => %{.button-text { color: red; font-size: 12pt; font-weight: bold; }},
@@ -58,18 +56,21 @@
:images_only => false, # set to true to forbid upload of anything else than images
:file_size_limit_mb => 10, # file max size
:button_after_container => false, # set to true to move the upload button below the container
# DO NOT CHANGE THESE IN YOUR CLASSES. Only application wide (routes or associations may depend on it)
+
:base_association_name => 'assets',
:alias_only => false, # set to true so that only aliases are authorized in url/path
:aliases => {
# "example" => "100x100#",
},
# path to the root of your public directory
:public_root => ":rails_root/public",
# added to :public_root as the root folder for all papermill items
- :papermill_prefix => "system/papermill"
+ :papermill_prefix => "system/papermill",
+ :max_width => 1000,
+ :max_height => 1000
}.deep_merge( Papermill.const_defined?("OPTIONS") ? Papermill::OPTIONS : {} )
PAPERCLIP_INTERPOLATION_STRING = ":id_partition/:style/:escaped_basename.:extension"
def self.included(base)