I'm writing an extension that would require user authentication.
Trying to use devise for this purpose (http://github.com/plataformatec/

I created an extension and using extension_controller generator
created a new controller (home) with one action welcome. This is just
to test things.

class HomeController < ApplicationController

  # prevent radiant authentication

  # force devise authentication
  before_filter :authenticate_member!

  def welcome

I also created model called Member and configured it with devise.

class Member < ActiveRecord::Base
devise :database_authenticatable,
         :rememberable,  # remember users via cookies
         :trackable, # track user logins, IPs, access times
         :timeoutable, # allow time outs due to inactivity
         :lockable, # lock accounts if fialed to login in a few tries
         :activatable, # activate accounts by other means (by
         :authentication_keys => [:login]

I also added to routes the following:
  map.devise_for :members

As you can see I've configured it all as per devise readme (modified
the model, added devise_for routes, etc).

By including this line in my home_controller to require an
authenticated user:
before_filter :authenticate_member!
I should be getting a login prompt, whenever I visit http://myradiantserver/home

But instead I'm getting
uninitialized constant SessionsController

Any ideas why this is happening? How to fix it?

Thanks in advance!

Reply via email to