Sha256: d4808bf7d3a518c6dcf09e56c07c59199e16184334abfe4770959e1b26394988

Contents?: true

Size: 945 Bytes

Versions: 3

Compression:

Stored size: 945 Bytes

Contents

# eyeballs_rails #

eyeballs_rails is a gem for using eyeballs.js in your Ruby on Rails projects.

eyeballs_rails brings the `eyeballs_javascripts` method to Rails, which wraps `javascript_include_tags` but also includes all of the eyeballs.js dependencies, including jQuery and mustache. It also includes all of your models and controllers.

## Using eyeballs in Rails ##

To install and/or update eyeballs javascripts in your Rails app, from the root directory, run:

    eyeballs init
    
This will vendor eyeballs and its dependencies into `public/javascripts/vendor`, the config files into `public/javascripts/config` and set up an initial `public/javascripts/app` directory.

To create a model, for example `Post`, just run:

    eyeballs generate model Post
    
Same for controllers:

    eyeballs generate controller posts


Finally, at the bottom of your template, just before the `</body>` tag, put the `eyeballs_javascripts` helper.

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
eyeballs_rails-0.1.4 README.md
eyeballs_rails-0.1.2.1 README.md
eyeballs_rails-0.1.2 README.md