Skip to content
aizawa1126 edited this page Jul 26, 2012 · 2 revisions

チュートリアル

rails new spine-sample
cd spine-sample/

vi Gemfile

gem 'spine-rails'
gem 'eco'

bundle update
rails g scaffold post title:string content:string
rake db:migrate
rails g spine:new
rails g spine:scaffold Post title content

vi app/assets/stylesheets/application.css

.stack > *:not(.active) {
  display: none;
}

vi app/assets/javascripts/app/index.js.coffee

@append(@posts = new App.Posts)

vi app/views/posts/index.html.erb

<div id="app"></div>

<script type="text/javascript" charset="utf-8">
  jQuery(function(){
    new App({el: $('#app')});
  })
</script>

rails s

Clone this wiki locally