I have created Posts model and I want to change flash notice text when model is saved or updated.
How I can do that?
Thank you!
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
Do this in your controller action, where you call
Postmethods, e.g.:It’s best to keep your models isolated from the controller and controller methods such as
flash, and set those in the controller instead.