0.0
No commit activity in last 3 years
No release in over 3 years
Helpers for using eyeballs.js with Ruby on Rails
2005
2006
2007
2008
2009
2010
2011
2012
2013
2014
2015
2016
2017
2018
2019
2020
2021
2022
2023
2024
2025
2026
 Dependencies
 Project Readme

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.

Installation

Just add 'eyeballs' and 'eyeballs_rails' to your Gemfile

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.