0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?

More than 3 years have passed since last update.

rails ajax通信のアプリを作成していたときにSweetalert2 : Unknown parameter type

Posted at

要はjsでアラートを表示してくれるライブラリです。
導入方法も簡単で、ajaxアプリにはもってこいです。

で、実際にサーバーを立ち上げると、

Sweetalert2 : Unknown parameter type

というアラートが。

この記事を見るとtypeというのは古いバージョンで今はtypeは使用しておらず、iconにする必要があるようです。

app/assets/javascripts/posts.js.erb
        swal.fire({
          icon: 'success',

このように記述して完了

0
0
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
0
0

Delete article

Deleted articles cannot be recovered.

Draft of this article would be also deleted.

Are you sure you want to delete this article?