my register.html.erb file is :
<% form_for :user do |form| %>
<p><br />
<fieldset>
<legend>Enter Your Detail</legend>
Screen Name
<input type="text" name="screen_name"
id="screen_name" size="20"
maxlength="40"/>
</p>
<p>
Email
<input type="text" name="email" id="email"
size="30"
maxlength="50"/>
</p>
<p>Password
<input type="password" name="password"
id="password" size="10"
maxlength="40"/>
</p>
</fieldset>
<p>
<input type="submit" name="register"
id="register"
value="Register!" />
</p>
<%end%>
and my user controller is
class UserController < ApplicationController
def index
end
def register
@title="Register"
if request.post? and params[:user]
@user = User.new(params[:user])
if @user.save
render :text =>"user created!"
end
end
end
end
my application.html.erb is
<!DOCTYPE html>
<html>
<head>
<title>My web Site</title>
<%= stylesheet_link_tag "site" %>
<%= javascript_include_tag :defaults %>
<%= csrf_meta_tag %>
</head>
<body>
<h1>My Website</h1>
<p>
<%=link_to "Register",:action =>"register",
:controller=>"user"%>|
<%=link_to
"Index",:action=>"index",:controller=>"site"%>|
<%=link_to "About
Us",:action=>"about",:controller=>"site"%>|
<%=link_to
"Help",:action=>"help",:controller=>"site"%>
</p>
<div id="content">
<%= @contenet_for_layout%>
</div>
<p>
<% if ENV["RAILS_ENV"] == "development" %>
<%= debug(params)%>
<% end %>
</p>
<%= yield %>
</body>
</html>
i dont no why i am getting routing error when i am click register
button
--
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-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
To unsubscribe from this group, send email to
rubyonrails-talk+unsubscribe-/JYPxA39Uh5TLH3MbocFF+G/Ez6ZCGd0@public.gmane.org
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en.