mois3x / sweet-alert-rails-confirm

A Rails confirm replacement with SweetAlert
MIT License
73 stars 50 forks source link

How i call function after confirm? #17

Closed adrianoresende closed 9 years ago

adrianoresende commented 9 years ago

How i make function after click confirm in Rails? Exemple javascript:

swal(
    { ... },
    function(isConfirm){
        ...
    }
);

Exemple HTML Rails:

<%= link_to raw('<i class="fa fa-trash-o"></i>'),
                       admin_remover_imovel_foto_path(:asset_id => asset.id),
                       :remote   => true,
                       :method   => :post,
                       :class    => 'remove-archive',
                       :data     => { 
                           :confirm => 'Are you sure?',
                           // :function => javascript function?
                       }
%>
mois3x commented 9 years ago

This is isn't implemented yet, maybe next week might be on it.

adrianoresende commented 9 years ago

Pull request --> https://github.com/mois3x/sweet-alert-rails-confirm/pull/21

emilkarl commented 9 years ago

When will this be in a release?

mois3x commented 9 years ago

Released