I get a routing error when I try and read from a text field. The
error says:
ROUTING ERROR
no route found to match “/\look\at” with {:method=>:get}
Heres the code Im using to read data from a text field:
input.html:
Textfields
<form action = "\look\at">
Please enter your name.
<br>
<input type = "text" name="text1">
<br>
<br>
<input type="submit"/>
</form>
look_controller.rb:
class LookController < ApplicationController
def at
@data = params[:text1]
end
end
at.rhtml:
Reading from Text FieldsReading from Textfields
Your name is <%= @data %>
Does anyone know why I keep getting this error. This seems like a
simple thing but I cant figure it out and its impeding my ruby
learning process.