Asp Forum
Home
|
Login
|
Register
|
Search
Forums
>
comp.lang.ruby
uninitialized constant UsersController::User
Claudio Manuel
10/27/2008 4:32:00 PM
hi there
I am new to ruby. I got the following error when creating a registation
page.
NameError in UsersController#new
uninitialized constant UsersController::User
here is the trace:
C:/opt/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in
`const_missing'
app/controllers/users_controller.rb:4:in `new'
I am using : http://localhost:3000/users/new
here is the users_controller.rb
class UsersController < ApplicationController
def new
@user = User.new
end
def create
@user = User.new(params[:user])
if @user.save
flash[:notice] = 'Thanks for signing up!'
redirect_to :controller => 'events', :action => 'index'
else
render :action => 'new'
end
end
end
2)can someone recommends a book (Rest V2) that has lost of
examples/tutorials
so I can learn it the right way.
thanks
claudio
--
Posted via
http://www.ruby-...
.
2 Answers
James Britt
10/28/2008 6:01:00 AM
0
Claudio Manuel wrote:
> hi there
> I am new to ruby. I got the following error when creating a registation
> page.
>
> NameError in UsersController#new
> uninitialized constant UsersController::User
>
> here is the trace:
> C:/opt/InstantRails/ruby/lib/ruby/gems/1.8/gems/activesupport-2.0.2/lib/active_support/dependencies.rb:478:in
> `const_missing'
> app/controllers/users_controller.rb:4:in `new'
You might do better asking Rails questions on the Rails mailing list.
Should be listed on
http://rubyon...
James
Ron Lel
2/22/2014 1:58:00 AM
0
If the 3S bid is nf, then this must be alerted. Call the director.
Ron
Servizio di avviso nuovi messaggi
Ricevi direttamente nella tua mail i nuovi messaggi per
uninitialized constant UsersController::User
Inserendo la tua e-mail nella casella sotto, riceverai un avviso tramite posta elettronica ogni volta che il motore di ricerca troverà un nuovo messaggio per te
Il servizio è completamente GRATUITO!
x
Login to ForumsZone
Login with Google
Login with E-Mail & Password