Skip to content

Instantly share code, notes, and snippets.

@brianstorti
Created October 8, 2011 18:35
Show Gist options
  • Save brianstorti/1272680 to your computer and use it in GitHub Desktop.
Save brianstorti/1272680 to your computer and use it in GitHub Desktop.
Twitter bootstrap with rails 3.1
Gemfile
gem 'twitter-bootstrap-rails'
gem 'less'
gem 'less-rails', :git => 'git://github.com/metaskills/less-rails.git'
applications.css
/*
*= require bootstrap
*/
/* Your stylesheets goes here... */
application.js
//= require bootstrap
$(document).ready(function(){
/* Your javascripts goes here... */
});
Using with coffeescript
create application.js.coffee
$ ->
$("body > .topbar").scrollSpy()
$ ->
$(".tabs").tabs()
$ ->
$("a[rel=twipsy]").twipsy live: true
$ ->
$("a[rel=popover]").popover offset: 10
$ ->
$(".topbar-wrapper").dropdown()
$ ->
$(".alert-message").alert()
$ ->
domModal = $(".modal").modal(
backdrop: true
closeOnEscape: true
)
$(".open-modal").click ->
domModal.toggle()
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment