bootstrap-colorpicker-rails
bootstrap-colorpicker-rails copied to clipboard
Change the path of assets
While migrating to Rails 4 I had an issue when the application couldn't find css and javascript files. Changing the path of assets fixed the problem.
I've tested fixed version of the gem on Rails 3.2.13 and it still works fine.
@jastkand you forgot to change the .css extension to .css.scss
Yes, this would be greatly appreciated as we are also using this gem with Rails 4.
Thanks !
@alessani I made a pull request #14 working with rails 4. The other pull request ( #11 ) was not working.
@acaron What do you mean by not working? Adding .scss extension is not necessary as sprockets can handle asset-url
helpers in .css files.
@jastkand see the document here: http://guides.rubyonrails.org/asset_pipeline.html "When using the asset pipeline, paths to assets must be re-written and sass-rails provides -url and -path helpers (hyphenated in Sass, underscored in Ruby)[...]"
and the answer here: http://stackoverflow.com/questions/15257555/how-to-reference-images-in-css-within-rails-4 "asset-data-url works for me after I changed my .css file to .css.scss file in a Rails 4 app"
Since it is sass-rails that provides helpers, it must be a .scss file. It was not working for me with a css file, it was interpreted as pure css. Hope this help!
Well, I see. It might be worked for me as I always were including .css files in .scss ones. @acaron's pull-request (#11) is much cleaner and is better to be merged. I fixed my version though.
P.S. Sorry I didn't noticed that everything is already merged and fixed :smile:
@jastkand ah! of course it was working then :smile: now the gem is up to date and we are all happy!