Skip to content

Put action-specific javascript and stylesheet link tags in the views, and render them in application.html.erb

Notifications You must be signed in to change notification settings

HeartbliT/action_assets_helper

 
 

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ActionAssetsHelper
==================

Convenient helper plugin to add javascripts and stylesheets via individual
views, and have them appear in the document head.


Example
=======

  # app/views/posts.html.erb:

  <% javascript_include 'post_show' -%>
  <% stylesheet_link 'posts' -%>


  # app/views/layouts/application.html.erb:

  <head>
    ...
    <%= javascript_include_actions -%>
    <%= stylesheet_link_actions -%>
  </head>

This specifies action-specific javascript and stylesheet in the view, while the
tags are rendered in the layout.

Copyright (c) 2009 Michael Nutt and Justin Camerer, released under the MIT license

About

Put action-specific javascript and stylesheet link tags in the views, and render them in application.html.erb

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages

  • Ruby 100.0%