README.rdoc in papermill-0.10.0 vs README.rdoc in papermill-0.10.1

- old
+ new

@@ -43,46 +43,49 @@ $ ./script/generate papermill PapermillMigration $ rake db:migrate === Then in environment.rb: - config.gem papermill -=== You can also modify a couple of default options that will be available application-wide : + ... - Papermill::OPTIONS = { - :thumbnail => { - :width => 150, - :height => 100 - }, - :aliases => { - :big => "500x500>" - :small => "100x100>" - }, - :public_root => ":rails_root/public", # already a default - :papermill_prefix => "system/papermill" # already a default - } - # see lib/papermill/papermill_module.rb for more options. - + Rails::Initializer.run do |config| + ... + config.gem papermill + + # You can set options that will be set application-wide : + module Papermill + OPTIONS = { + :thumbnail => { + :width => 150, + :height => 100 + }, + :aliases => { + :big => "500x500>" + :small => "100x100>" + }, + :public_root => ":rails_root/public", # already a default + :papermill_prefix => "system/papermill" # already a default + } + end + # see lib/papermill/papermill_module.rb + ... + end + === In your assetable model: # You can set a catch-all papermill association : papermill :class_name => MyAssetClass # or create an association for the specific :my_gallery key - papermill :my_gallery_assets, - :class_name => MyGalleryAsset, - :thumbnail => { - :width => 90, - :height => 30 - } + papermill :my_gallery_assets, :class_name => MyGalleryAsset === In your layout: <%= papermill_stylesheet_tag %> <%= papermill_javascript_tag :with_jquery => "no_conflict" %> - # you won't need :with_jquery if you have already loaded it. + # you won't need :with_jquery if you have it already. === In your edit form: f.images_upload(:my_gallery) # use specific papermill :my_gallery declaration f.assets_upload(:my_assets) # use catch-all @@ -101,10 +104,10 @@ # if your association name is singularizable, you can do smtg like : @assetable.asset(:my_other_asset).try(:url) # equivalent to: @assetable.assets(:my_other_asset).first.try(:url) -Also see http://github.com/bbenezech/papermill/raw/master/installation-template.txt for more precises installation steps. +Also see http://github.com/bbenezech/papermill/raw/master/installation-template.txt Have a look at the API here http://rdoc.info/projects/BBenezech/papermill === Translations: Papermill is fully I18n-able. \ No newline at end of file