Difference between redirect_to and render

Introduction

I was worried because I couldn't use redirect_back to get the error message because I didn't understand the difference between redirect_to and render. If anyone is worried, I hope I can help as much as possible.

redirect_to Executes the specified action once and displays the view corresponding to that action By the way, redirect_back works the same as redirect_to and can return the user to the previous page.

render Show view file without taking action

Two ways to move

-Redirect_to: controller-> URL-> route-> controller-> view -Render: controller → view

Use properly

-Render: If login or input format fails, etc. = Just display an error -Redirect_to: When data update / deletion is required = controller processing is required

Recommended Posts

Difference between redirect_to and render
Difference between render and redirect_to
Difference between render and redirect_to
[rails] Difference between redirect_to and render
Difference between vh and%
Difference between i ++ and ++ i
Difference between CUI and GUI
Difference between variables and instance variables
Difference between class and instance
Difference between ArrayList and LinkedList
Difference between List and ArrayList
Difference between .bashrc and .bash_profile
Difference between StringBuilder and StringBuffer
[Rails] What is the difference between redirect and render?
Rough difference between RSpec and minitest
[Rails] Difference between find and find_by
Proper use of redirect_to and render
Difference between instance variable and class variable
[JAVA] Difference between abstract and interface
Difference between Thymeleaf @RestController and @Controller
Difference between Stream map and flatMap
[Java] Difference between array and ArrayList
Difference between primitive type and reference type
Difference between string.getByte () and Hex.decodeHex (string.toCharaArray ())
[Java] Difference between Closeable and AutoCloseable
[Java] Difference between StringBuffer and StringBuilder
[Java] Difference between length, length () and size ()
[Android] Difference between finish (); and return;
[Rails] Differences between redirect_to and render methods and how to output render methods
Difference between final and Immutable in Java
[Java] Difference between Closeable and AutoCloseable
Difference between pop () and peek () in stack
[For beginners] Difference between Java and Kotlin
Difference between isEmpty and isBlank of StringUtils
Difference between getText () and getAttribute () in Selenium
About the difference between irb and pry
Difference between "|| =" and "instance_variable_defined?" In Ruby memoization
Difference between EMPTY_ELEMENTDATA and DEFAULTCAPACITY_EMPTY_ELEMENTDATA in ArrayList
[Ruby] Difference between print, puts and p
[Java] Difference between Intstream range and rangeClosed
Difference between int and Integer in Java
Difference between next () and nextLine () in Java Scanner
Understand the difference between abstract classes and interfaces!
What is the difference between SimpleDateFormat and DateTimeFormatter? ??
Criteria for proper use of render and redirect_to
Difference between member and collection of rails routes.rb
[Ruby] Difference between puts and return, output and return value
[Rails] Difference between create method and new + save method
[Java] Difference between "final variable" and "immutable object"
Switch between JDK 7 and JDK 8
About the difference between classes and instances in Ruby
Difference between new and create in Rais action controller
[Java] Difference between static final and final in member variables
Compare the difference between dockerfile before and after docker-slim
[JAVA] What is the difference between interface and abstract? ?? ??
Difference between Spring AOP and library proxy target class
What is the difference between skip and pending? [RSpec]
[Swift] UITextField taught me the difference between nil and ""
[Java beginner] Difference between length and length () ~ I don't know ~
Relationship between Controller and View
Difference between element 0, null and empty string (check in list)