-
Notifications
You must be signed in to change notification settings - Fork 0
Upgrading to Rails engine
In your User model, change:
include Clearance::Model
to:
include Clearance::User
In your ApplicationController, change:
include Clearance::App::Controllers::ApplicationController
to:
include Clearance::Authentication
If you haven’t edited PasswordsController or ConfirmationsController, delete them and the app/views/passwords and app/views/confirmations directories.
If you’ve added edit, update, show, index, or destroy actions to the controller, change:
class UsersController < ApplicationController
include Clearance::UsersController
end
To:
class UsersController < Clearance::UsersController
end
Otherwise, delete it. Same for SessionsController, although it is more likely that you can completely delete the SessionsController and app/views/sessions directory in your app.
You can delete app/models/clearance_mailer.rb and app/views/clearance_mailer.
Check the config/routes.rb
file in Clearance. Remove any routes in your app that are included by Clearance.
In test/test_helper.rb, delete:
include Clearance::TestHelper
In test/unit/user_test.rb, delete:
include Clearance::UserTest
In test/functional/sessions_controller_test.rb, delete:
include Clearance::SessionsControllerTest
In test/functional/users_controller_test.rb, delete:
include Clearance::UsersControllerTest
You’ll also want to find and replace instances of:
- logged_in? with signed_in?
- login_as with sign_in_as
- crypted_password with encrypted_password
- remember_token with token
- remember_token_expires_at with token_expires_at
We suggest using ack
to search through files.
curl http://ack.googlecode.com/svn/tags/latest/ack > ~/bin/ack && chmod 0755 !$