I am new to rails and ruby. I am trying to make a simple project and have this problem. I have a view with some text fields on it, when I click the "Submit" button, in my controller I need the values ββfrom these fields as strings, I try to use this path params[:field1] , but the value is in this format { "field1" => "some_value"}, this is not a string, and I have problems with it. How can I solve it?
UP: view code
<%= form_tag :action=>:login_user do %> <div class="field"> <h2>Login</h2> <%= text_field "field1", "field1" %> </div> <div class="field"> <h2>Password</h2> <%= password_field "field2", "field2" %> </div> <div class="actions"> <%= submit_tag "Login" %> </div> <% end %>
source share