ifad / data-confirm-modal

Makes Rails' link_to confirm: 'foo' build a Bootstrap Modal instead of calling the browser's confirm() API.
MIT License
270 stars 115 forks source link

//= require data-confirm-modal does not work after installing the gem #67

Open chrilleferna opened 6 years ago

chrilleferna commented 6 years ago

I installed them gem and inserted the //= require data-confirm-modal in application.js This resulted in a Sprocket error with message: couldn't find file 'data-confirm-modal' with type 'application/javascript'

So I had to add the data-confirm-modal.js manually to my assets/javascripts directory :-(

vjt commented 6 years ago

Hello, this is bizarre. Did you restart the server after installing the gem? Care to provide the Rails version you're using?

Thanks

sabatesduran commented 6 years ago

It doesn't work for me either I follow the instructions and I restarted the server but I still get the same js console error:

Uncaught Error: The bootstrap modal plugin does not appear to be loaded.

I use Bootstrap 4 and Rails 5.1.2.

jesusabarca commented 5 years ago

I'm getting the same error as well when running rails assets:precompile

jesusabarca commented 5 years ago

Nvm, the gem was included only for development and testing, that's why we were getting the error in production 😅