Cuhaml::Contrib
Contributed helpers to spice up your cuba+haml apps
Installation
Add this line to your application's Gemfile:
gem 'cuhaml-contrib'
And then execute:
$ bundle
Or install it yourself as:
$ gem install cuhaml-contrib
Usage
-
Require it:
require "cuhaml/contrib"
-
Enable the plugin:
Cuba.plugin Cuhaml::Contrib::ContentFor
-
In your layout files:
- yield_for :js
-
In your views:
- content_for :js do
:javascript console.log('hello world!');
Contributing
- Fork it
- Create your feature branch (
git checkout -b my-new-feature
) - Commit your changes (
git commit -am 'Add some feature'
) - Push to the branch (
git push origin my-new-feature
) - Create new Pull Request