Nerian / bootstrap-datepicker-rails

A Datepicker for Twitter Bootstrap, integrated with Rails assets pipeline
MIT License
649 stars 182 forks source link

Problem with UserMailer + premailer-rails #58

Closed jpbarbosa closed 11 years ago

jpbarbosa commented 11 years ago

Hello,

Great gem, but I had problems using it with UserMailer + premailer-rails. I got this error when sending emails with HTML template:

undefined method `[]' for nil:NilClass

To fix it a just change the way bootstrap-datepicker.css is inserted:

Old way: *= require bootstrap-datepicker (into application.css.scss) New way: @import "bootstrap-datepicker" (into custom.css.scss)

You could try to reproduce this error and change README.md instructions (https://github.com/Nerian/bootstrap-datepicker-rails#configuration)

Thanks!

Nerian commented 11 years ago

Seems like a premailer problem.

This is Rails' default way to declare an asset.

 *= require bootstrap-datepicker 

If that doesn't work for premailer, then premailer is doing something wrong :)