Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # views/layouts/application.html.erb
- <% flash.each do |name, msg| -%>
- <%= content_tag :div, msg, class: name %>
- <% end -%>
- # app/controllers/index_controller.rb
- def index
- flash[:notice] = t("Some notice")
- end
- # config/locales/en.yml
- en:
- "Some notice": "Some Translated Notice"
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement