README.rdoc in rails_uploads-0.1.4 vs README.rdoc in rails_uploads-0.1.5

- old
+ new

@@ -1,6 +1,6 @@ -=== NOTE: From version 0.1.3 and above RailsUploads::Engine renamed Rails::Uploads::Engine +=== NOTE: From version 0.1.5 and above defaults must be put in public/uploads folder --- {<img src="https://codeclimate.com/github/mattways/rails_uploads.png" />}[https://codeclimate.com/github/mattways/rails_uploads] {<img src="https://travis-ci.org/mattways/rails_uploads.png?branch=master" alt="Build Status" />}[https://travis-ci.org/mattways/rails_uploads] {<img src="https://gemnasium.com/mattways/rails_uploads.png" alt="Dependency Status" />}[https://gemnasium.com/mattways/rails_uploads] @@ -17,26 +17,26 @@ $ bundle = Usage Mount the engine at the end of you routes.rb: - mount Rails::Uploads::Engine => '/' # Will be use to generate on the fly missing image presets + mount RailsUploads::Engine => '/' # Will be use to generate on the fly missing image presets Add the column to your table (just a string): create_table :models do |t| t.string :prop end If you need a file: class Model < ActiveRecord::Base attr_accessible :prop - attached_file :prop, :default => 'file.txt' # It's optional set a default file, the path it's relative to the public folder (used to generate the url) + attached_file :prop, :default => 'file.txt' # It's optional set a default file end If you need a image: class Model < ActiveRecord::Base attr_accessible :prop - attached_image :prop, :presets => [:small, :big], :default => 'assets/image.jpg' # It's optional set a default image, the path it's relative to the publica folder (used to generate the url) + attached_image :prop, :presets => [:small, :big], :default => 'assets/image.jpg' # It's optional set a default image end Define presets in your application.rb config.uploads.presets = { :big => { :method => :fit, :width => 1024, :height => 768 }, # Fit will scale the image until it fit in the space without cropping