Skip to content

Latest commit

 

History

History
76 lines (50 loc) · 983 Bytes

001.md

File metadata and controls

76 lines (50 loc) · 983 Bytes

Welcome

Rails New

$ rails new rails-example --skip-test-unit
$ cd rails-example

Root Route

config/routes.rb:

root 'welcome#index'

Welcome Controller

$ rails generate controller welcome index

Twitter Bootstrap

Bootswatch

Gemfile:

gem 'therubyracer', platforms: :ruby
gem 'twitter-bootswatch-rails'
gem 'twitter-bootswatch-rails-helpers'

Theme

$ rails generate bootswatch:install yeti
$ rails generate bootswatch:import yeti --force
$ rails generate bootswatch:layout yeti

JavaScript

app/assets/javascripts/application.js:

//= require yeti/loader
//= require yeti/bootswatch

Stylesheet

app/assets/stylesheets/application.css:

 *= require yeti/loader
 *= require yeti/bootswatch

app/assets/stylesheets/yeti/variables.less:

@zindex-modal-background:     0;

Layout

app/views/layouts/application.html.erb:

Navbar

app/views/layouts/_navbar.html.erb: