Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Updated readme with usage instructions

  • Loading branch information...
commit 8f95ba107a0902ef316c59ad75e7e309eb05d37f 1 parent ab3cad0
arvida authored
Showing with 35 additions and 1 deletion.
  1. +35 −1 README.rdoc
View
36 README.rdoc
@@ -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 %>
+
Please sign in to comment.
Something went wrong with that request. Please try again.