bluerail / twitter-bootstrap-rails-confirm

Confirm dialogs using Twitter Bootstrap
https://bluerail.nl
MIT License
85 stars 34 forks source link

When message is numerical, the call replace on message will cause a TypeError #22

Closed zsy056 closed 10 years ago

zsy056 commented 10 years ago

When message is numerical, the call replace on message will cause a TypeError For example:

link_to t("view.destroy"), path,
      method: :delete,
      class: 'btn btn-danger',
      :"data-confirm" => 42.0,
     ...

Will generate HTML like

<a class="btn btn-danger" data-confirm="42.0" data-method="delete" ...>...</a>

And will cause

Uncaught TypeError: Object 42.0 has no method 'replace' 
martijn commented 10 years ago

Thanks!