ruby on rails - Include assets in engine from main application -
i have created admin interface rails engine. in project work in @ moment need add custom javascript. want keep in main app , not add in engine.
perhaps register javascript or stylesheet files in config file , let engine include them.
any ideas on how can achieve this?
you asking ideas, here one: use convention!
it's common in rails, why not engine. document how name files , configure (assets need configured differently when should not included in application.js/css). admin interface typus same thing: http://docs.typuscmf.com/customization/custom_css_and_js.html
in engine, can check if file present in mounting app , include in case.
should pretty straight forward.
Comments
Post a Comment