README.rdoc in papermill-2.0.2 vs README.rdoc in papermill-2.1.0
- old
+ new
@@ -27,12 +27,12 @@
Check your audience.
=== Server requirements:
-* Rails 2.3.4
-* Paperclip 2.3
+* Rails 2.3.[4~>8]
+* Paperclip 2.3.1.1 (loaded with gem dependency)
* Front web server serving static assets if present, and forwarding demand to rails if not. Any classic installation will do that by default.
* NOT compatible with Heroku/S3
== Installation
@@ -84,21 +84,17 @@
}
</script>
<% end %>
Before </body>
- <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>
- <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
+ <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript"></script>
<% unless @content_for_papermill_inline_js.blank? %>
<%= stylesheet_link_tag("/facebox/facebox.css", "/jgrowl/jquery.jgrowl.css", "/Jcrop/jquery.Jcrop.css", "/papermill/papermill.css", :cache => "papermill") %>
<style type="text/css">
<%= yield :papermill_inline_css %>
</style>
- <script type="text/javascript">
- var SWFUPLOAD_PENDING = "Waiting...";
- var SWFUPLOAD_LOADING = "Loading...";
- </script>
<% end %>
== Security
=== URL-hacking
@@ -112,13 +108,19 @@
Assetable is the class that has_many papermill_assets (i.e. the class with the papermill declaration)
=== Assetable declaration
-You can have a generic association and as many declarative associations as you want in your model. Papermill will always use specific if found.
+You can have one :default association (his settings will be used for unfound associations) and as many other associations as you want in your model.
+You can define a papermill relationship dynamically: just do smtg like Assetable.papermill(:dynamic_key, {}) when you need to. Perfect for CMS where associations are created by users. Then you'll be able to use assetable.dynamic_key to retrieve the associated assets. If you don't send the {}, default options from default association will be used, which may or may not be what you want.
+Actually, the form helper leverages this when you use a :key that doesn't exist: it will create a new Papermill relationship whith :key as the name and options from the :default declaration if any found on the model.
+
+If you don't need dynamic keys, just declare your associations in the model, like this :
+
class Article
+ papermill :default
papermill :images
papermill :pdf_version
papermill :cover_image
papermill :illustrations
end
@@ -222,10 +224,10 @@
Consist of:
:geometry => "ImageMagick-geometry-string"
:copyright => true | "copyright" # If true, the asset copyright field will be used. Edit the asset.
- :watermark => URI | true # If true, will use options[:watemark]
+ :watermark => true | URI # If true, will use options[:watemark]
Examples:
#config/initilializers/papermill.rb
\ No newline at end of file