Permalink
Browse files

Updated readme with usage instructions

  • Loading branch information...
arvida
arvida committed Nov 14, 2010
1 parent ab3cad0 commit 8f95ba107a0902ef316c59ad75e7e309eb05d37f
Showing with 35 additions and 1 deletion.
  1. +35 −1 README.rdoc
View
@@ -2,4 +2,38 @@
For use with http://resizor.com.
-Inspired by Paperclip
+Inspired by Thoughtbot's Paperclip
+
+== Usage
+
+Add resizor to your Gemfile
+
+ gem 'resizor'
+
+Install resizor gem
+
+ $ bundle install
+
+Add a initializer to RAILS_ROOT/config/initializers/resizor.rb
+
+ Resizor.configure do |config|
+ config.api_key = 'my-api-key'
+ end
+
+Add Resizor fields to your model
+
+ $ rails generate resizor MyModel image
+
+Add has_resizor_asset to MyModel
+
+ class MyModel < ActiveRecord::Base
+ has_resizor_asset :image
+
+ ...
+ end
+
+Add a file field to the form for MyModel
+
+ <%= f.label :image %>
+ <%= f.file_field :image %>
+

0 comments on commit 8f95ba1

Please sign in to comment.