Check if individual asset matches filters#514
Check if individual asset matches filters#514schneems wants to merge 1 commit intosstephenson:masterfrom
Conversation
This PR exposes `matches_filter` via a public method called `filtered?` for the purposes of detecting if an asset exists in a filter. This is to be used in rails/sprockets-rails#96. This change to sprockets was requested by @rafaelfranca to prevent the interface from accidentally changing or breaking.
|
I'm going to redo all the path lookup helpers for 3.x. I don't particularly like this api. |
|
We could preserve the existing protected API and call it The method doesn't even need to be on We've got options. We need this functionality exposed, I'm very open to how we write the implementation. Let me know which of the above options you like the best, or please suggest something else. |
|
Heres the direction I'm trying to go by exposing more filter as enumerators. https://github.com/sstephenson/sprockets/blob/master/lib/sprockets/manifest.rb#L109-L151 It should be easier to chain filters on to them. And even better you can use |
This PR exposes
matches_filtervia a public method calledfiltered?for the purposes of detecting if an asset exists in a filter. This is to be used in rails/sprockets-rails#96. This change to sprockets was requested by @rafaelfranca to prevent the interface from accidentally changing or breaking.