Error in new.rhtml

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

-----------new.rhtml---------------

Fill the form to Register

<%= @user %>

<% form_for(@user) do |f| %>
<%= f.error_messages %>

<%= f.label :login, Login %>
<%= f.text_field :login %>

<%= f.label :password %>
<%= f.text_area :password %>

<%= f.label :name %>
<%= f.text_area :name %>

<%= f.label :email %>
<%= f.text_area :email %>

<%= f.submit 'Create' %>

<% 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:

Fill the form to Register


2: <%= @user %>
3:
4: <% form_for(@user) do |f| %>
5: <%= f.error_messages %>
6:
7:



can any one tell how to solve this

On Mon, Jul 27, 2009 at 2:34 PM, Aashish
Kiran[email protected] wrote:

  end
undefined method `users_path’ for #ActionView::Base:0x4fd6fe8

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

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs