As others have pointed out, there's a validation failing on your User
model.

I'd also point out that RailsSpace may not be a good book to start
with, as it is positively ancient as Rails books code. The printed
code is targeted at version 1.2.3, which is over 2 years old now.
You'll be better served, I'd assume, with a newer tutorial.

--Matt Jones


On Aug 28, 8:20 am, RubyonRails_newbie <[email protected]>
wrote:
> Hello,
>
> I am following the RailsSpace tutorial and am at the point where I am
> creating a new user through (user/register)
>
> I have added the details into the form: screen_name, email and
> password.
>
> When I click register, I would expect this to be saved (commited) to
> the database.
>
> However – when I look in the terminal, it says ‘Rollback’ instead of
> ‘COMMIT’
>
> The code in the user controller looks like this:
>
> class UserController < ApplicationController
>
>   def register
>     @title = "Register"
>     if request.post? and params[:user]
>       @user = User.new(params[:user])
>       if @user.save
>         flash[:notice] = "User #[email protected]_name} created!"
>         redirect_to :action => "index"
>       end
>     end
>   end
>
> Does anyone know why in my terminal it is not saving this as I’d
> expect?
>
> Many Thanks
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to 
[email protected]
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to