Hi Guys, I want show alert with datas (like table data) in dialogbox alert, I have try with this code
@alerts = Rails.cache.read('safety_alerts').where(profile_id: @organization.profiles.pluck(:id)).unread.order('created_at DESC').group_by(&:profile)
@alerts.each do |profile, alert|
sweetalert_error(+ profile.full_name + " - " + alert.last.alert_msg + "!", 'Need Attenion!', persistent: 'OK!')
end
but only one data show on dialogbox ?
And i wan to count each data appear and save it to database, when button click
Thanks