Skip to content

Commit

Permalink
update readme for rails 3
Browse files Browse the repository at this point in the history
  • Loading branch information
Chad Pytel committed Jun 10, 2010
1 parent 4f77ac4 commit d41e21f
Showing 1 changed file with 10 additions and 23 deletions.
33 changes: 10 additions & 23 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ Fork away and create a [Github Issue](http://github.com/thoughtbot/clearance/iss
Installation
------------

Clearance is a Rails engine. It works with versions of Rails greater than 2.3.
Clearance is a Rails engine. The latest stable version works with versions of Rails greater than 3. If you need to run on Rails 2.x, install Clearance Version 0.8.8.

Install it as a gem however you like to install gems. Also, uninstall old versions:

Expand Down Expand Up @@ -71,7 +71,7 @@ and add your route above (before) Clearance routes in config/routes.rb:

map.resource :session, :controller => 'sessions'

See lib/clearance/routes.rb for all the routes Clearance provides.
See config/routes.rb for all the routes Clearance provides.

Actions that redirect (create, update, and destroy) in Clearance controllers
can be overriden by re-defining url_after_(action) methods as seen above.
Expand All @@ -85,29 +85,16 @@ opinion is that you should test its integration with your app using

Run the Cucumber generator and Clearance feature generator:

script/generate cucumber
script/generate clearance_features

All of the files generated should be new with the exception of the
features/support/paths.rb file. If you have not modified your paths.rb then you
will be okay to replace it with this one. If you need to keep your paths.rb
file then add these locations in your paths.rb manually:

def path_to(page_name)
case page_name
when /the sign up page/i
new_user_path
when /the sign in page/i
new_session_path
when /the password reset request page/i
new_password_path
end
end
script/rails generate cucumber
script/rails generate clearance_features

Edit config/environments/cucumber.rb to include these lines:
Edit your Gemfile to include:

config.gem 'factory_girl'
config.action_mailer.default_url_options = { :host => 'localhost:3000' }

Edit your config/enviroments/cucumber.rb to include the following:

ActionMailer::Base.default_url_options = { :host => 'localhost:3000' }

Then run rake!

Expand All @@ -118,7 +105,7 @@ We use & recommend [Formtastic](http://github.com/justinfrench/formtastic).

Clearance has another generator to generate Formastic views:

script/generate clearance_views
script/rails generate clearance_views

Its implementation is designed so other view styles (Haml?) can be generated.

Expand Down

0 comments on commit d41e21f

Please sign in to comment.