This will render a particular view using the instance variables available in the action.
For example if a render was used for the new action, when a user goes to
This will send a redirect to the user's browser telling it to re-request a new URL as 302 redirect response. Then the browser will send a new request to that URL and it will go through the action for that URL, oblivious to the fact that it was redirected to. None of the variables created in the action that caused the redirect will be available to the redirected view. This is what happens when you click on
If you do not have a
If you need to render another action's view, you can use
If you need the user to run a new action, use
Other posts:
Difference between update_attribute and update_column
What is different in update_all, update, update_attribute, update_attributes methods of Active Record
Difference between .nil?, .empty?, .blank?, .present?
render vs redirect_to in Ruby on Rails
About
Related posts: Difference between update_attribute and update_column
What is different in update_all, update, update_attribute, update_attributes methods of Active Record
Difference between .nil?, .empty?, .blank?, .present?
render vs redirect_to in Ruby on Rails
About
Difference between update_attribute and update_column
What is different in update_all, update, update_attribute, update_attributes methods of Active Record
Difference between .nil?, .empty?, .blank?, .present?
render vs redirect_to in Ruby on Rails
About
No comments:
Post a Comment