This README would normally document whatever steps are necessary to get the application up and running.
Things you may want to cover:
-
Ruby version
-
System dependencies
-
Configuration
-
Database creation
-
Database initialization
-
How to run the test suite
-
Services (job queues, cache servers, search engines, etc.)
-
Deployment instructions
-
...
-
NOTE:
Setup:
- Create database refresh_page.
- Change host in database to connect to your database.
- uncomment User.create_record in users_controller.rb to insert record in the table to demonstrate.
Reproducing step:
- Run the server and trigger the url
- On the page display click on the button "Get User Details"
- Then the user details will be displayed in table.
- On this page if refreshing the page params do not contain data in the request to the controller.
SOLUTION:
By default the Rails form_tag helper creates a form with method="post". To make this a GET, change your view template to look something like:
<%= form_tag({ :action => 'get_detail' }, :method => :get) do %> … <% end %>
This will put the form parameters in the browser's address bar, so when refreshing, the parameters are sent as expected. I hope that helps.