Sprocket support for ICanHaz templates
JavaScript Ruby
Switch branches/tags
Nothing to show
Fetching latest commit…
Cannot retrieve the latest commit at this time.
Permalink
Failed to load latest commit information.
app/assets/javascripts
lib
spec
.gitignore
Gemfile
Gemfile.lock
MIT-LICENSE
README.md
Rakefile
spine-rails-icanhaz.gemspec

README.md

README

spine-rails-icanhaz adds support for ICanHaz views into the Rails asset pipeline. They can be used in spine controllers, just like the eco templates, with the syntax:

ich['modelname/filename'](data)

Installation

  1. Add spine-rails-icanhaz to your Gemfile:

     gem 'spine-rails-icanhaz'
    
  2. Add icanhaz to your index.js.coffee after the spine require:

     #= require spine
     #= require spine/manager
     #= require spine/ajax
     #= require spine/route
     #= require spine/relation
    
     #= require icanhaz
    

Usage

You can load ICanHaz views from your app/assets/javascripts/app/views directory, just like eco views, but using the ich object:

    render: ->
      @html ich['addresses/edit'](@item)

The view loaded here would be app/assets/javascripts/app/views/addresses/edit.ich