en: flash_messages: # # These are the translations for the different headings. # headings: success: "Success!" info: "Info!" warning: "Warning!" error: "Error!" # # Add default flash messages: defaults: success: "Your request processed successfully" error: "Something went wrong" # create: # success: "Successfully created!" # error: "Something went wrong. Please take a look at the form to see what went wrong." # # Add flash messages for controller actions: mailchimp: subscribe: success: Thanks for subscribing to our newsletter. error: Sorry, an error happened (you might already be subscribed or your email is not valid). # products: # create: # success: "This is a notification" # error: "Something went wrong" # # Inside controller: # def create # flash!(:success, :error) # redirect_to(:root) # end # # OR # # def create # redirect_to(:root, :flash => [:success, :error]) # end # # OR # # def create # flash_now!(:success, :error) # render("new") # end