ruby - How should I disable some of my devise flash messages in rails -


how should disable of devise flash messages in rails? have customized devise flash messages in config/locales/devise.en.yml file. don't want of them. evenafter comment or delete of find appear in ui. example

en:   devise:     confirmations:       confirmed: "your account confirmed."       # send_instructions: "you receive email instructions how confirm account in few minutes."       send_paranoid_instructions: "if email address exists in our database, receive email instructions how confirm account in few minutes." 

this added in layouts/application.html.erb

      <% if notice %>         <p class="alert alert-notice" style="color:#c09853;"><%= notice %></p-->       <% end %>       <% if alert %>         <p class="alert alert-error" style="color:#b94a48;"><%= alert %></p>       <% end %> 

i have commented send_instruction. when run restart server, still appears in ui. possible solution? thanks.

in devise.en.yml file, specify each message empty:

en:   devise:     confirmations:       confirmed: ''       send_instructions: ''        send_paranoid_instructions: "if email address exists in our database, receive email instructions how confirm account in few minutes." 

in layout:

<% flash.each |key, value| %>   <%= content_tag :div, value, :class => "flash #{key}" unless value.blank? %> <% end %> 

Comments

Popular posts from this blog

how to proxy from https to http with lighttpd -

android - Automated my builds -

python - Flask migration error -