Sha256: 577542d2ddb9d606b8c5b1a440811eab26eb63444d3e5597437a0220337c2e98
Contents?: true
Size: 1.67 KB
Versions: 4
Compression:
Stored size: 1.67 KB
Contents
= Papermill Asset management made easy.. Painfully easy. Try the demo to see for yourself. See papermill_module.rb for a complete list of available options. These options can be application wide, for a class, or set at the last moment for the helper. In your model: papermill :assets In your layout: <%= papermill_stylesheet_tag %> <%= papermill_javascript_tag :with_jquery => true %> In your edit form: f.images_upload(:my_image_gallery) f.image_upload(:header_image) Finally, in your views: # Some template image : <%= image_tag @article.assets(:header_image).first.url("800x>") %> # Some image gallery: <ul> <% @article.assets(:my_image_gallery).each do |image| %> <li><%= link_to(image_tag(image.url("100x100>")), image.url) %></li> <% end %> </ul> Also see http://gist.github.com/177714.txt to get up-to-date installation steps. See the API here http://rdoc.info/projects/BBenezech/papermill == Word of caution: Beta. This is xNIX only (system("rm ...")). You'll need rails 2.3, since this is an engine. Anyway, copying the controller/view/routes to your project will make it work on an older version of rails. You'll need rails 2.2, since their are calls to I18n.t. But it shouldn't be too hard to work-around either. == Usage : === Demo : You can use the custom template generator to get an example application up and running in no time. rails -m http://gist.github.com/177714.txt papermill-example === Translation: Papermill is fully Rails 2.2 I18n-able. Copy config/locale/papermill.yml to your root config/locale folder to modify any wording in a any locale. Copyright (c) 2009 Benoit Bénézech, released under the MIT license
Version data entries
4 entries across 4 versions & 1 rubygems
Version | Path |
---|---|
BBenezech-papermill-0.1.0 | README.rdoc |
BBenezech-papermill-0.1.1 | README.rdoc |
BBenezech-papermill-0.1.2 | README.rdoc |
BBenezech-papermill-0.1.3 | README.rdoc |