gist-embed.js for Rails
gist-embed.js for Rails
Installation
Add this line to your application's Gemfile:
gem 'gist-embed-rails'
And then execute:
$ bundle
Or install it yourself as:
$ gem install gist-embed-rails
Add to application.js
//= require jquery
//= require gist-embed
Add in html template:
<code data-gist-id="<gist-id>"></code>
Usage
Variants of usage: http://blairvanderhoof.com
Turbolinks
Compatable with jquery.turbolinks
Contributing
To refresh gem, run:
$ rake gist_embed:upload