Please enable JavaScript.
Coggle requires JavaScript to display documents.
Asset Pipeline (How (Organization (Search path (manifest require rule…
-
sprockets concatenate all JavsScript file into one master .js file then reduce the number of requests
-
-
it has pre-processor to allow developer using high-level language, like coffee, scss and erb.
-
assets put in app/asset directory, and this directory are served by Sprockets middleware
In production, Rails precompiles these files to public/assets by default.
Controller Specific Assets (one controller cascading and coffee and scss file)
include specific controller asset <%= javascript_include_tag params[:controller] %> or <%= stylesheet_link_tag
params[:controller] %>
-
app/assets : for assets that are owned by the application, such as images, js and stylesheets.
-
vendor/assets : owned by outside entities, such as javascript plugin and css frameworks.
-
-
-
-
turbolink : speeds up your app and makes it behave like a SPA (Single Page App), it does this by loading only the content between your body tags (using javascript) basically by making and AJAX request to the server
-
-
-
config/initializers/assets.rb : Rails.application.config.assets.precompile += %w( admin.js admin.css )
-
-