Skip to content

Upgrading to Rails engine

croaky edited this page Sep 13, 2010 · 13 revisions

User model

In your User model, change:

include Clearance::Model

to:

include Clearance::User

ApplicationController

In your ApplicationController, change:

include Clearance::App::Controllers::ApplicationController

to:

include Clearance::Authentication

Controllers

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.

Tests

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