This project rocks and uses MIT-LICENSE.
Current version dependents on Ratchet v2.0.2
gem 'twitter_ratchet_rails'
- the first way is to require all the files once
//= require twitter_ratchet_rails
- the other way is to require js that you need
for example:
//= require twitter_ratchet_rails/modal # use http://goratchet.com/components#modals
- use default Ratchet theme, just require
ratchet_base
in yourapplication.css
/*
*= require ratchet_base
*/
- If you want to use Android theme or IOS theme, so you can follow this:
/*
*= require ratchet_base
*= require ratchet_ios # or ratchet_android
*/
Make sure wrap all non-bar HTML in the .content div
(this is actually what scrolls), See Wiki: http://goratchet.com/components/
Ruby on Rails Example:
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Ratchet template page</title>
<!-- Sets initial viewport load and disables zooming -->
<meta name="viewport" content="initial-scale=1, maximum-scale=1, user-scalable=no, minimal-ui">
<!-- Makes your prototype chrome-less once bookmarked to your phone's home screen -->
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="black">
<%= csrf_meta_tags %>
<%= stylesheet_link_tag "wap", media: "all", "data-turbolinks-track" => true %>
<%= javascript_include_tag "wap", "data-turbolinks-track" => true %>
</head>
<body>
<!-- Make sure all your bars are the first things in your <body> -->
<header class="bar bar-nav">
<h1 class="title">Ratchet</h1>
</header>
<!-- Wrap all non-bar HTML in the .content div (this is actually what scrolls) -->
<div class="content">
<%= yield %>
</div>
</body>
</html>
cd test/dummy
bundle install
rake db:migrate
rails server