Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

readme

  • Loading branch information...
commit bc0bd8afacf2e20e40fcf1beeb6f1747fef88279 1 parent 2465e21
Benoit Bénézech authored

Showing 1 changed file with 12 additions and 10 deletions. Show diff stats Hide diff stats

  1. +12 10 README.rdoc
22 README.rdoc
Source Rendered
@@ -29,8 +29,8 @@ Check your audience.
29 29
30 30 === Server requirements:
31 31
32   -* Rails 2.3.4
33   -* Paperclip 2.3
  32 +* Rails 2.3.[4~>8]
  33 +* Paperclip 2.3.1.1 (loaded with gem dependency)
34 34 * Front web server serving static assets if present, and forwarding demand to rails if not. Any classic installation will do that by default.
35 35 * NOT compatible with Heroku/S3
36 36
@@ -86,17 +86,13 @@ Inside <head></head>
86 86 <% end %>
87 87
88 88 Before </body>
89   - <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.1/jquery.min.js" type="text/javascript"></script>
90   - <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.7.2/jquery-ui.min.js" type="text/javascript"></script>
  89 + <script src="http://ajax.googleapis.com/ajax/libs/jquery/1.4.2/jquery.min.js" type="text/javascript"></script>
  90 + <script src="http://ajax.googleapis.com/ajax/libs/jqueryui/1.8.2/jquery-ui.min.js" type="text/javascript"></script>
91 91 <% unless @content_for_papermill_inline_js.blank? %>
92 92 <%= stylesheet_link_tag("/facebox/facebox.css", "/jgrowl/jquery.jgrowl.css", "/Jcrop/jquery.Jcrop.css", "/papermill/papermill.css", :cache => "papermill") %>
93 93 <style type="text/css">
94 94 <%= yield :papermill_inline_css %>
95 95 </style>
96   - <script type="text/javascript">
97   - var SWFUPLOAD_PENDING = "Waiting...";
98   - var SWFUPLOAD_LOADING = "Loading...";
99   - </script>
100 96 <% end %>
101 97
102 98 == Security
@@ -114,9 +110,15 @@ Assetable is the class that has_many papermill_assets (i.e. the class with the p
114 110
115 111 === Assetable declaration
116 112
117   -You can have a generic association and as many declarative associations as you want in your model. Papermill will always use specific if found.
  113 +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.
  114 +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.
  115 +
  116 +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.
  117 +
  118 +If you don't need dynamic keys, just declare your associations in the model, like this :
118 119
119 120 class Article
  121 + papermill :default
120 122 papermill :images
121 123 papermill :pdf_version
122 124 papermill :cover_image
@@ -224,7 +226,7 @@ Consist of:
224 226
225 227 :geometry => "ImageMagick-geometry-string"
226 228 :copyright => true | "copyright" # If true, the asset copyright field will be used. Edit the asset.
227   - :watermark => URI | true # If true, will use options[:watemark]
  229 + :watermark => true | URI # If true, will use options[:watemark]
228 230
229 231 Examples:
230 232

0 comments on commit bc0bd8a

Please sign in to comment.
Something went wrong with that request. Please try again.