Вопрос по ruby-on-rails-3, ruby-on-rails – Когда использовать render против redirect_to при обработке ошибок

1

Error: User Rate Limit Exceeded

Ваш Ответ

2   ответа
10

renderredirect:

when you use render, you pass the instantiated object

this object, newly created or updated, received some params

when attempting to save the object, validation was triggered and, if unsuccessful, added errors to the current instance

so your object in memory contains validation errors.

either the object is saved and you can get the persisted data from database

or if it's not saved, you can have some information you previously stored in session

Error: User Rate Limit Exceeded
2


redirect_to

Похожие вопросы