# Restful\_authentication --need a little help

**URL:** <https://www.ruby-forum.com/t/restful-authentication-need-a-little-help/87059>\
**Category:** Rails\
**Created:** [February 27, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/restful-authentication-need-a-little-help/87059 "2007-02-27T21:01:26Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [February 27, 2007, 9:01pm UTC](https://www.ruby-forum.com/t/restful-authentication-need-a-little-help/87059/1 "2007-02-27T21:01:26Z")

</div>

Hello,

I’ve adapted an successfully adapted an example from ‘Rails Cookbook’  
(6.1) as a means of experiment with the ‘restful\_authentication’ from

[http://agilewebdevelopment.com/plugins/restful\_authentication](http://agilewebdevelopment.com/plugins/restful_authentication)

Here are the steps I’ve followed:

1.) ./script/generate authenticated user sessions --include-activation

2.) ./script/generate authenticated\_mailer user

3.) #application.rb  
include AuthenticatedSystem

4.) #routes.rb  
map.resources :users, :sessions

5.) rake db:migrate

In theory, I should be able to goto to:

[http://0.0.0.0:3000/users/new](http://0.0.0.0:3000/users/new)

And get a form for creating a new user…

Instead I get a 500 error and the following lines in my log file:

#-------------------------------------------------------------  
Rendering  
/usr/local/lib/ruby/gems/1.8/gems/actionpack-1.13.2/lib/action\_controller/templates/rescues/layout.rhtml  
(404 Page Not Found)  
undefined method `helper_method' for Object:Class ./script/../config/../lib/authenticated_system.rb:96:in `send’  
./script/…/config/…/lib/authenticated\_system.rb:96:in `included’  
./script/…/config/…/app/controllers/application.rb:4  
#-------------------------------------------------------------

#The line in question from authenticated\_system.rb

1. def self.included(base)
2. 

```
 base.send :helper_method, :current_user, :logged_in?

```

3. end

My questions are these:

1. What does this error mean? The error is thrown in the  
authenticated\_system code, but I have a feeling that I am at fault. The  
ruby here is a little more abstract than I’m used to.

2. Does anyone know of a good discussion of restful\_authentication?

Thanks for your consideration.

---

<div class="post-metadata">

**Author:** ![eblatt](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/e/7bcc69/32.png) [@eblatt](https://www.ruby-forum.com/u/eblatt)\
**Post date:** [February 27, 2007, 10:51pm UTC](https://www.ruby-forum.com/t/restful-authentication-need-a-little-help/87059/2 "2007-02-27T22:51:18Z")

</div>

Sorry.

My include statement was outside the class definition.

Problem solved.
