ActionController::RoutingError

Posted by Steve on Stack Overflow See other posts from Stack Overflow or by Steve
Published on 2010-04-26T10:37:29Z Indexed on 2010/04/26 10:53 UTC
Read the original article Hit count: 240

Filed under:
|

Hi All, I am just learning Rails. I had encountered a routing error, though I think I have specified the correct rules in the routing.rb. I have attached the code. Please help

routing.rb

  map.connect ':controller/:action'
  map.connect ':controller/:action/:id'
  map.connect ':controller/:action/:id.:format'

Controller

class EntriesController < ApplicationController
  def sign_in
    @name = params[:visitor_name]
  end
end

View

<html> 
<head><title>Hello <%=h @name %></title></head>
<body> 
<%=h @name %>
<% form_tag :action => 'sign_in' do %>
<p>Enter your name:
<%= text_field_tag 'visitor_name', @name %></p>
<%= submit_tag 'Sign in' %>
<% end %>
</body> 
</html>

Thanks

© Stack Overflow or respective owner

Related posts about ruby-on-rails

Related posts about routing