I''ve been using restful_authentication for several months, and noticed there have been some security fixes so I figured it was time to upgrade. I ran into an error, and thought it might have been specific to the app I''m working on, but I tried creating an app from scratch and setting up restful_authentication and get the same error. Here''s what I tired: rails test_app cd test_app script/plugin install restful_authentication script/plugin install http://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk script/generate authenticated user sessions --include-activation -- stateful # configure database.yml rake db:migrate script/server Then when I go to http://localhost/users/new and try to sign up a new user, I get the following: NameError (undefined local variable or method `record'' for #<UsersController:0xb7be35ec>): /app/controllers/users_controller.rb:21:in `create'' Has anyone else seen this? I''m running rails 2.0.2, and using the latest versions of the plugins as of today (2/6/2008). If I leave out the --stateful option, everything works, but of course I''m not using all of the acts_as_state_machine improvements to restful_authentication. Thanks, Bruz --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi Bruz, Yes, I have the same problem and no solution yet. NameError in UsersController#create undefined local variable or method `record'' for #<UsersController: 0x2c516e0> At least your post tells me that leaving out the -stateful option will work BUT I need this option. Rgs euro On Feb 6, 9:15 pm, Bruz <bruz.marz...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> I''ve been using restful_authentication for several months, and noticed > there have been some security fixes so I figured it was time to > upgrade. I ran into an error, and thought it might have been specific > to the app I''m working on, but I tried creating an app from scratch > and setting up restful_authentication and get the same error. Here''s > what I tired: > > rails test_app > cd test_app > script/plugin install restful_authentication > script/plugin installhttp://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk > script/generate authenticated user sessions --include-activation -- > stateful > # configure database.yml > rake db:migrate > script/server > > Then when I go tohttp://localhost/users/newand try to sign up a new > user, I get the following: > > NameError(undefinedlocalvariableormethod`record'' for > #<UsersController:0xb7be35ec>): > /app/controllers/users_controller.rb:21:in `create'' > > Has anyone else seen this? I''m running rails 2.0.2, and using the > latest versions of the plugins as of today (2/6/2008). If I leave out > the --stateful option, everything works, but of course I''m not using > all of the acts_as_state_machine improvements to > restful_authentication. > > Thanks, > Bruz--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
Hi, I was getting this problem too. In UserController, change: @user.register! if record.valid? to @user.register! if @user.valid? Working fine for me now. Hope that helps! On Feb 7, 12:42 pm, euro <raynevilleglanm...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote:> Hi Bruz, > > Yes, I have the same problem and no solution yet. > > NameError in UsersController#create > undefined local variable or method `record'' for #<UsersController: > 0x2c516e0> > > At least your post tells me that leaving out the -stateful option will > work BUT I need this option. > > Rgs > euro > > On Feb 6, 9:15 pm, Bruz <bruz.marz...-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org> wrote: > > > I''ve been using restful_authentication for several months, and noticed > > there have been some security fixes so I figured it was time to > > upgrade. I ran into an error, and thought it might have been specific > > to the app I''m working on, but I tried creating an app from scratch > > and setting up restful_authentication and get the same error. Here''s > > what I tired: > > > rails test_app > > cd test_app > > script/plugin install restful_authentication > > script/plugin installhttp://elitists.textdriven.com/svn/plugins/acts_as_state_machine/trunk > > script/generate authenticated user sessions --include-activation -- > > stateful > > # configure database.yml > > rake db:migrate > > script/server > > > Then when I go tohttp://localhost/users/newandtry to sign up a new > > user, I get the following: > > > NameError(undefinedlocalvariableormethod`record'' for > > #<UsersController:0xb7be35ec>): > > /app/controllers/users_controller.rb:21:in `create'' > > > Has anyone else seen this? I''m running rails 2.0.2, and using the > > latest versions of the plugins as of today (2/6/2008). If I leave out > > the --stateful option, everything works, but of course I''m not using > > all of the acts_as_state_machine improvements to > > restful_authentication. > > > Thanks, > > Bruz--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---
That did the trick! Somehow I figured that the error was just a symptom of a bigger problem, but in this case I guess it was just that one line of code. Thanks! On Feb 7, 8:23 am, LogicLab <logicla...-gM/Ye1E23mwN+BqQ9rBEUg@public.gmane.org> wrote:> Hi, > > I was getting this problem too. > > In UserController, change: > > @user.register! ifrecord.valid? > > to > > @user.register! if @user.valid? > > Working fine for me now. > > Hope that helps! >--~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org To unsubscribe from this group, send email to rubyonrails-talk-unsubscribe-/JYPxA39Uh5TLH3MbocFFw@public.gmane.org For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---