leikind / wice_grid

A Rails grid plugin to create grids with sorting, pagination, and (automatically generated) filters
MIT License
537 stars 215 forks source link

rails4 asset pipeline support #165

Closed ashanbrown closed 9 years ago

ashanbrown commented 9 years ago

Thanks for grabbing my last pull requests. I'm not sure I've got this one quite right (because to do that I'd have to fully understand the rails asset pipeline and sprockets and I think there may be only one or two people in the whole world like that. ;).

So what I'm doing here is using the image-url helpers so that I get a fingerprinted asset name, and I'm explicitly adding the wice_grid assets to the precompile list so that they are generated. I'm using rails4 and I had trouble in production with the assets because rails4 no longer automatically precompiles assets from vendor gems. I've been looking for some online guidance that tells all gem owners with image assets that they should be explicitly precompiling their assets and using the image-url helper to ensure that (a) they get fingerprinted assets and (b) their css is dependent on those fingerprints (I think image-url implicitly creates this dependency, but I could be wrong). I haven't found anything explicitly saying all this, but that's my takeaway from what I've read.

leikind commented 9 years ago

Thanks! I do not have much time to work on WiceGrid and I welcome any input!

I will have to run tests with my test suite with Rails 4, and Rails 3 (I still need Rails 3 compatibility), I will do that as soon as I have some time.

leikind commented 9 years ago

merged, thanks

ashanbrown commented 9 years ago

Thanks for merging my change. I was wondering if moving some portion of the test suite back into the wice_grid repo and including the wice_grid repo itself as a submodule your test repo(s) might be might allow you to continue testing the way you do while providing a way to submit pull requests coupled with tests. I can imagine wanting to contribute more to your repo, but not being able to make a pull request with tests and code in one go makes me a little reluctant to contribute for fear of getting caught up in complex merge process. I do realize this would be a bunch of work but I thought I'd suggest it as a possibility. Thanks again.