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