Skip to content

Commit

Permalink
Updated readme with usage instructions
Browse files Browse the repository at this point in the history
  • Loading branch information
arvida committed Nov 14, 2010
1 parent ab3cad0 commit 8f95ba1
Showing 1 changed file with 35 additions and 1 deletion.
36 changes: 35 additions & 1 deletion README.rdoc
Original file line number Diff line number Diff line change
Expand Up @@ -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.