On Mon, Jul 27, 2009 at 2:34 PM, Aashish
Kiran<[email protected]> wrote:
>
>  class UserController < ApplicationController
>  def new
>   �...@user = User.new
>    p �...@user
>
>    respond_to do |format|
>      format.html # show.html.erb
>      format.xml  { render :xml => @post }
>
>    end
>  end
>
> ----------------------------------------------------------------------------------------
> --------in the browser i am getting error as
> follows---------------------
>
> NoMethodError in User#new
>
> Showing app/views/user/new.html.erb where line #4 raised:
>
> undefined method `users_path' for #<ActionView::Base:0x4fd6fe8>
>
> Extracted source (around line #4):
>
> 1: <h1>Fill the form to Register</h1>
> 2: <%= @user %>
> 3:
> 4: <% form_for(@user) do |f| %>
> 5:   <%= f.error_messages %>
> 6:
> 7:   <p>
> ....
> ....


Your routes.rb should contain a line called
map.resources :users
Let me know if that helps.

Regards,
Vagmi
> -------------------------------------
>
> can any one tell how to solve this
> --
> Posted via http://www.ruby-forum.com/.
>
> >
>



-- 
Regards,
Vagmi Mudumbai
----------------------------
CTO & Co Founder
Artha42 Technology Solutions Pvt. Ltd.,
http://www.artha42.com

--~--~---------~--~----~------------~-------~--~----~
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