New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Rewrite callbacks for avoid using redirect_to :back #2113
Conversation
@@ -21,7 +21,7 @@ def create | |||
if @blockchain.save | |||
redirect_to admin_blockchains_path | |||
else | |||
flash[:alert] = @blockchain.errors.full_messages | |||
flash[:alert] = @blockchain.errors.full_messages.first |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why did you change to .first
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@ysv without .first
we will see error like ["ERROR_TEXT"]
with .first
it would be just like string without any characters.
@ymasiuk Create issue please |
@ymasiuk Please rebase, your patch doesn't work now. |
afeb0e7
to
95050a5
Compare
@shal done |
* Change redirect_to to render (#2113) * Rewrite callbacks for avoid using redirect_to :back
* Change redirect_to to render (openware#2113) * Rewrite callbacks for avoid using redirect_to :back
* Change redirect_to to render (#2113) * Rewrite callbacks for avoid using redirect_to :back
* Change redirect_to to render (openware#2113) * Rewrite callbacks for avoid using redirect_to :back
* Change redirect_to to render (openware#2113) * Rewrite callbacks for avoid using redirect_to :back
* Change redirect_to to render (#2113) * Rewrite callbacks for avoid using redirect_to :back
No description provided.