Skip to content

Show datas (like table data) on dialogbox and count each data then save it to database #8

@zaychoer

Description

@zaychoer

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

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions