I wish I could buy you a drink of your choice Frederick.  Thank you for 
taking the time to look over my post!  It's truly appreciated!  

On Friday, April 11, 2014 4:39:42 PM UTC-4, Frederick Cheung wrote:
>
> On Friday, April 11, 2014 7:37:53 PM UTC+1, Colin Stodd wrote: 
> > So I've gone over this tutorial, literally recreated the app 4 times but 
> I keep getting stuck at the create user with a form in Ch 7. Rails 3 
> edition. 
> > 
> > From what I can tell, there is no action (Post) being created when I 
> click on the submit button (no user being created, or errors being 
> generated).  It reads it as (GET).  And when I click the button, the URL 
> shows my authenticity-token....... blah blah...(not sure if that can help 
> explain my problem).  Please can someone help me get past this. I have 
> looked for nearly weeks with no avail. 
> > 
> > ``` 
> > <form class="form"> 
> >   <div class="container-fluid"> 
> >     <div class="row"> 
> >       <div class="col-xs-7 col-md-7"> 
> >         <%= form_for(@user) do |f| %> 
>
>
> Your error is here - you've got a form within a form which is invalid html 
>
> Fred 
>
>
>
> > 
> >           <%= render 'shared/error_messages' %> 
> > 
> >           <%= f.label :name %> 
> >           <%= f.text_field :name %> 
> > 
> >           <%= f.label :email %> 
> >           <%= f.text_field :email %> 
> > 
> >           <%= f.label :password %> 
> >           <%= f.password_field :password %> 
> > 
> >           <%= f.label :password_confirmation, "Confirmation" %> 
> >           <%= f.password_field :password_confirmation %> 
> > 
> >           <%= f.submit "Create my account", class: "btn btn-large 
> btn-primary" %> 
> > 
> >           <% end %> 
> >       </div> 
> >     </div> 
> >   </div> 
> > </form> 
> > 
> > ``` 
> > 
> > users.controller.rb 
> > ``` 
> > class UsersController < ApplicationController 
> >     def show 
> >     @user = User.find(params[:id]) 
> >   end 
> > 
> >   def new 
> >     @user = User.new 
> >   end 
> > 
> >   def create 
> >     @user = User.new(params[:user]) 
> >     if @user.save 
> >       flash[:success] = "Welcome personal web application!" 
> >       redirect_to @user 
> >     else 
> >       render 'new' 
> >     end 
> >   end 
> > 
> > end 
> > 
> > ``` 
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to rubyonrails-talk+unsubscr...@googlegroups.com.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/rubyonrails-talk/53e0f3e9-7a9d-4758-b61d-e7936e7d778e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to