If I’m using //=require_tree . in application.css, is there a way to exclude particular files other than resorting to //=require_directory and tree organization?
Perhaps something like //= require_tree ., {except: 'something'}
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
This is possible with Sprocket’s new
stubdirective which is available in Sprockets v2.2.0 and up. However, Rails 3.2 will only ever use Sprockets v2.1.3 which does not have this feature. As of now, the current Edge Rails has thestubdirective and it will officially be in Rails 4.0 and above.Usage:
stubdirectives can not be overridden by subsequentrequireorincludedirectives.If you want to use the
stubdirective in your Rails 3.2 project you will have to switch to Edge Rails, or branch your Rails gem with its Sprockets dependency modified to version 2.2.0.