undefined method 'authenticate_user!' (Yet Another)

已查看 908 次
跳至第一个未读帖子

Fabrice

未读,
2010年11月12日 07:15:072010/11/12
收件人 Devise
Hello,

I keep getting the typical "undefined method `authenticate_user!'"
error in my controller.
I'm using it like this:
class ProductController < ApplicationController
before_filter :authenticate_user!, :except => [:list, :show]

Where is this method declared ? Where can I look at ? What makes the
method available in the controller ?

I installed Devise using the following instructions:
gem install devise
rails generate devise:install
rails generate devise product

The versions are Rails 3.0.1 and Devise 1.1.3.

Thank you,

Fabrice

Carlos Antonio da Silva

未读,
2010年11月12日 09:36:082010/11/12
收件人 plataforma...@googlegroups.com
You've generated devise for Product model, that should give you authenticate_product! instead of authenticate_user!
--
At.
Carlos A. da Silva
回复全部
回复作者
转发
0 个新帖子