0.0
No commit activity in last 3 years
No release in over 3 years
Instead of using the default assets managing style in rails 3.2, this gem will introduce a new way to manage your assets. This is still a prototype, the fullfledged version will publish soon.
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
 Dependencies

Development

~> 3.2.8
>= 0

Runtime

 Project Readme

ViewAssets Build Status

A new method to manage assets in a rails project. Instead of using the default assets managing style in rails 3.2, this gem will introduce a new way to manage your assets. This is only a prototype of the whole project, the fullfledged version will publish soon. It works like assetpipeline, but comes with different conventions. It doesn't include all your assets simply even if you have view/page or controller specific assets. It is page-specific.

Conventions/Rules

According to ViewAssets, there are three folders in /public folder:

* vendor
* lib
* app

Each sence of them are the same as in rails3 assetpipeline.

DIRECTIVES

for javascript double-slash syntax => "//= require_vendor xxx" space-asterisk syntax => " = require_vendor xxx" slash-asterisk syntax => "/= require_vendor xxx */"

for stylesheets space-asterisk syntax => " = require_vendor xxx" slash-asterisk syntax => "/= require_vendor xxx */"

Usage

First, include ViewAssets in helpers/application_helper.rb

module ApplicationHelper
  include ViewAssets
end

Add some other codes in your views/layouts/application.html.rb

<%= include_assets_with_assets_mvc(params[:controller], params[:action]) %>

If some of your controllers use their own layout file, and following rules in ViewAssets, then you should add that code above too.

This project rocks and uses MIT-LICENSE.