Tell us what is the difference between redirect and render in ruby on rails?



Tell us what is the difference between redirect and render in ruby on rails?..

Answer / Rakee Maurya

In Ruby on Rails, `redirect` changes the HTTP response status to a temporary (3xx) redirect. It then sends the user agent to another URL specified by the argument. On the other hand, `render` generates a response with data from a template directly without changing the HTTP status or sending the user agent to another URL.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Ruby on Rails Interview Questions

Is Ruby is a Scripting Language or Compiled Language?

4 Answers   Baidu,


How is direct different from render?

1 Answers  


Who developed ruby on rails?

1 Answers  


Do you know what is sweeper in rails?

1 Answers  


List out the few features of Ruby?

1 Answers  


Explain coc in rails?

1 Answers  


Mention the role of rails controller.

1 Answers  


What is the difference between delete and destroy ?

1 Answers  


What is the purpose of require_relative in ruby?

1 Answers  


How to use two databases into a single application?

1 Answers  


Explain model in rails?

1 Answers  


How can you protect filter methods in rails?

1 Answers  


Categories