Skip to content

Instantly share code, notes, and snippets.

@gouf
Last active August 29, 2015 14:11
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save gouf/94cd5af3b11f092451d1 to your computer and use it in GitHub Desktop.
Save gouf/94cd5af3b11f092451d1 to your computer and use it in GitHub Desktop.
Integrate Rails and Flat UI
mkcd rails_flat
rails new .
vim .bowerrc
{
  "directory": "vendor/assets/components"
}
bower install flat-ui
rails g scaffold blog title:string
rake db:migrate
vim config/initializers/assets.rb
# Add
Rails.application.config.assets.precompile += %w( flat-ui.css flat-ui.js )
vim app/views/layouts/application.html.erb
<!-- Add -->
<%= stylesheet_link_tag 'flat-ui', media: 'all', 'data-turbolinks-track' => true %>
<%= javascript_include_tag 'flat-ui', 'data-turbolinks-track' => true %>
rails s
# and access localhost:3000/blogs

Links

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment