Total Blog Views: 53
Blog Status: publish
Created By: swazahmad Created at: 08-15-2021
Tags: ruby on rails sweetalert attractive notification ruby on rails
How To configure Sweetalert For Rails Flash Messages
Add Below Line In Gemfile
gem 'sweetalert-rails'
bundle install
//= require sweetalert
*= require sweetalert
Then Update application.html.erb
<script type="text/javascript">
<% if notice.present?%>
var message = "<%= notice %>";
sweetAlert(message);
<% end %>
<% if alert.present?%>
var message = "<%= alert %>";
sweetAlert(message);
<% end %>
</script>
we have the “Get things executed” lifestyle at our place of work. There are not any excuses, no if’s or however’s in our dictionary. committed to navigating the ship of creativity to create cell answers, we resolve the real-lifestyles troubles of our clients and their clients. Our passion for work has won us many awards, year after 12 months.
© Copyright Shadbox. All Rights Reserved
Rate Blog :
Share on :
Do you have any blog suggestion? please click on the link