W
W
WEB_champion2014-11-16 12:54:46
Ruby on Rails
WEB_champion, 2014-11-16 12:54:46

How to create another application in the assets folder in Rails?

Rails version 4.
There is an application in the assets folder (for js and css.)
The fact is that for one layout I want to use the current application, which includes certain files (css and js), and for another - another application, and naturally with another name, for example application_game, and there include the necessary files with require.
But if in the second layout-e I write:
<%= stylesheet_link_tag 'application_game'or <%= javascript_link_tag 'application_game'- displays an error (exception). As far as I know such application_game is not registered.
But how can the problem be solved?

Answer the question

In order to leave comments, you need to log in

1 answer(s)
V
Viktor Vsk, 2014-11-16
@WEB_champion

config.assets.precompile += %w( application_game.js )
stackoverflow.com/questions/16168166/rails-4-asset...

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question