Why not use index
manifest and organize your app/assets
into decoupled modules? Then you can link to a specific image, image_tag('admin/logo.png')
, and get your own UI code base organized in a more meaningful way for free. You could even promote a complex component, such as a one-page application, into its own module and reuse it from different parts of the application.
Let's say the application is composed of three modules: the public side, the admin user interface, and, for example, CRM, so that your agents monitor the sales process in your company:
app/assets/ βββ coffeescripts β βββ admin β β βββ components β β βββ index.coffee β β βββ initializers β βββ application β β βββ components β β βββ index.sass β β βββ initializers β βββ crm β βββ components β βββ index.sass β βββ initializers βββ images β βββ admin β βββ application β βββ crm βββ stylesheets βββ admin β βββ components β βββ index.sass βββ application β βββ components β βββ index.sass βββ crm βββ components βββ index.sass 21 directories, 6 files
Remember to update your application.rb
so that they are precompiled:
config.assets.precompile = %w(admin.js application.js crm.js admin.css application.css crm.css)
source share