Ha! I found a problem. The problem is because I try to register a user while I'm logged on
But, how fix this? On Thu, Jun 16, 2011 at 8:54 PM, Fernando Aureliano < m...@fernandoaureliano.com> wrote: > Yeah, finally I got the answer! > > > http://stackoverflow.com/questions/6376718/devise-display-a-custom-sign-up-form-anywhere-in-your-app > > But, for some reason, when I registered an user, he's not recorded on db. > But the terminal see the data correctly =/ > > In the terminal, I see the data, but the record its not happening. Oo > > > > Started POST "/users" for 127.0.0.1 at 2011-06-16 20:13:33 -0300 > Processing by Devise::RegistrationsController#create as HTML > Parameters: {"utf8"=>"✓", > "authenticity_token"=>"ULeV0DeOgB+Ss2qD43to/TifRfGlHxcGhJ6XDDNviBo=", > "user"=>{"nome"=>"fsdasdf", "sobrenome"=>"fasdf", "email"=>" > ferna...@dz3.com.br", "tipo"=>"Distribuidores", "password"=>"[FILTERED]", > "password_confirmation"=>"[FILTERED]"}, "commit"=>"Sign up"} > User Load (1.0ms) SELECT "users".* FROM "users" WHERE "users"."id" = 1 > LIMIT 1 > Redirected to http://localhost:3000/admin > Completed 302 Found in 119ms > > > On Thu, Jun 16, 2011 at 6:42 PM, Fernando Aureliano < > m...@fernandoaureliano.com> wrote: > >> Hi! >> >> First user (admin) I already register. >> >> It's a security question. If I leave the registration page open, everyone >> can find that and register yourself on admin, and have access... >> >> =D >> >> >> >> On Thu, Jun 16, 2011 at 6:10 PM, Colin Law <clan...@googlemail.com>wrote: >> >>> On 16 June 2011 20:52, Fernando Aureliano <m...@fernandoaureliano.com> >>> wrote: >>> > I can get the form in another view with the code below. >>> > But when insert the data and submit, the user is not recorded in >>> database >>> >>> I can only repeat my previous post exactly: >>> Have a look in development.log to check that the data are being posted >>> correctly and it is going to the correct action. Then if all looks ok >>> use ruby-debug to break into your code and see what is going on. Have >>> a look at the Rails Guide on debugging to find how to do this. >>> >>> Colin >>> >>> > >>> > <%= form_for(User.new, :as => :user, :url => registration_path(:user)) >>> do >>> > |f| %> >>> > >>> > <p><%= f.label :email %><br /> >>> > <%= f.email_field :email %></p> >>> > >>> > <p><%= f.label :password %><br /> >>> > <%= f.password_field :password %></p> >>> > <p><%= f.label :password_confirmation %><br /> >>> > <%= f.password_field :password_confirmation %></p> >>> > <p><%= f.submit "Sign up" %></p> >>> > <% end %> >>> > >>> > On Tue, Jun 14, 2011 at 4:37 AM, Colin Law <clan...@googlemail.com> >>> wrote: >>> >> >>> >> On 14 June 2011 03:00, Fernando Aureliano <m...@fernandoaureliano.com >>> > >>> >> wrote: >>> >> > The form appears, I put the data and go! >>> >> > Dont show any erros, but the data are not recorded >>> >> >>> >> Have a look in development.log to check that the data are being posted >>> >> correctly and it is going to the correct action. Then if all looks ok >>> >> use ruby-debug to break into your code and see what is going on. Have >>> >> a look at the Rails Guide on debugging to find how to do this. >>> >> >>> >> Colin >>> >> >>> >> -- >>> >> 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@googlegroups.com. >>> >> To unsubscribe from this group, send email to >>> >> rubyonrails-talk+unsubscr...@googlegroups.com. >>> >> For more options, visit this group at >>> >> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >> >>> > >>> > >>> > >>> > -- >>> > Fernando Aureliano >>> > >>> > -- >>> > 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@googlegroups.com >>> . >>> > To unsubscribe from this group, send email to >>> > rubyonrails-talk+unsubscr...@googlegroups.com. >>> > For more options, visit this group at >>> > http://groups.google.com/group/rubyonrails-talk?hl=en. >>> > >>> >>> -- >>> 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@googlegroups.com. >>> To unsubscribe from this group, send email to >>> rubyonrails-talk+unsubscr...@googlegroups.com. >>> For more options, visit this group at >>> http://groups.google.com/group/rubyonrails-talk?hl=en. >>> >>> >> >> >> -- >> *Fernando Aureliano* >> >> > > > -- > *Fernando Aureliano* > -------------------------------------------------------------- > [iOSDeveloper] - *ObjectiveC* > [WebDesigner] - *CSS3&HTML5* > *[WebDeveloper] - RubyOnRails* > *-------------------------------------------------------------- > * > [portfolio] <http://www.fernandoaureliano.com> - > [blog]<http://www.fernandoaureliano.com/> > - [personal blog] <http://www.obsessivocompulsivo.com/> - > [twitter]<http://twitter.com/Pailoro> > > -- *Fernando Aureliano* -------------------------------------------------------------- [iOSDeveloper] - *ObjectiveC* [WebDesigner] - *CSS3&HTML5* *[WebDeveloper] - RubyOnRails* *-------------------------------------------------------------- * [portfolio] <http://www.fernandoaureliano.com> - [blog]<http://www.fernandoaureliano.com/> - [personal blog] <http://www.obsessivocompulsivo.com/> - [twitter]<http://twitter.com/Pailoro> -- 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@googlegroups.com. To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.