bootstrap_flash_messages
bootstrap_flash_messages copied to clipboard
translation missing: en.flash_messages.defaults.notice
I get this message when trying to show :flash => :notice from private message. Everything else seems to work perfectly...
def set_standard @standard = Standard.for(current_user).find(params[:id]) rescue ActiveRecord::RecordNotFound redirect_to(standards_path, :flash => :notice) end
standards: create: success: "Reliability Standard has been created." error: "Reliability Standard has not been created." update: success: "Reliability Standard has been updated." error: "Reliability Standard has not been updated." destroy: success: "Reliability Standard has been deleted." set_standard: notice: "The Reliability Standard you were looking for could not be found."
I get the same. This gem seems to only work on RESTful actions. Did you come up with a solution?
Are you using the newest version? It should work on all non-RESTful actions. I use it like that all the time. Make sure the 'standards' locale is nested inside flash_messages, like this:
flash_messages:
standards:
create:
success: "Reliability Standard has been created."
error: "Reliability Standard has not been created."
update:
success: "Reliability Standard has been updated."
error: "Reliability Standard has not been updated."
destroy:
success: "Reliability Standard has been deleted."
set_standard:
notice: "The Reliability Standard you were looking for could not be found."
I just tested it several times and it always shows the notice correctly. It only shows the error message if the locales aren't set up correctly, so I think that's the case.