README.md in spine-rails-0.0.5 vs README.md in spine-rails-0.0.6
- old
+ new
@@ -10,12 +10,10 @@
* Adds Spine to the asset pipeline, so you can easily require it in your applications: `//= require spine`
* Adds some Spine generators, so you can easily create Spine Models, Views and Controllers.
-For versions of Rails less than 3.1, it only provides the generator to install JavaScript file into public directory.
-
### Installation
In your Gemfile, add this line:
gem "spine-rails"
@@ -37,49 +35,51 @@
By default your application will be namespaced by the `app` directory. You can specify a different namespace with the `--app` option:
rails g spine:new --app foo_bar
+**NOTE:** If you use the `--app` option here, then you will also have to specify it with other generators.
+
Use the top-level level `index.coffee` file to setup namespacing and initial controller instantiation.
## Generators
spine-rails provides three simple generators to help you get started:
### Model
rails g spine:model User email username full_name
-This generator creates a very minimal model inside `app/assets/javascript/models`. You can optionally provide a list of attributes for the model.
+This generator creates a very minimal model inside `app/assets/javascript/app/models`. You have to provide a list of attributes for the model.
### Controller
rails g spine:controller Users
-This generator creates a minimal `Users` controller in `app/assets/javascripts/controllers` to get you started.
+This generator creates a minimal `Users` controller in `app/assets/javascripts/app/controllers` to get you started.
### View
rails g spine:view users/index
-This generates creates blank Spine views in the `app/assets/javascripts/views/users` directory.
+This generator creates a blank Spine view `app/assets/javascripts/app/views/users/index.jst.ejs`.
-The generator will create views in `hamljs`, `eco` or `ejs` format, depending on which gems are availale:
+The generator will create views in `hamljs`, `eco` or `ejs` format, depending on the gems availale:
-- [eco](https://github.com/sstephenson/eco) - will use ECO templates
-- [rub-haml-js](https://github.com/dnagir/ruby-haml-js) - will use HAMLJS templates
-- otherwise, EJS templates will be used
+1. [eco](https://github.com/sstephenson/eco) - will use ECO templates
+2. [rub-haml-js](https://github.com/dnagir/ruby-haml-js) - will use HAMLJS templates
+3. otherwise, EJS templates will be used
## Example Usage
Created a new Rails 3.1 application called `blog`.
rails new blog
Edit your Gemfile and add
- gem 'spine-rails'
+ gem "spine-rails"
Install the gem and generate resource.
bundle install
@@ -114,8 +114,10 @@
App.Post.first().content;
For more information on how to integrate Spine with Rails, please see the [Rails guide](http://spinejs.com/docs/rails).
+Also if you want to have some useful helpers to bridge the gap between Spine and Rails, then [spine-extensions](https://github.com/dnagir/spine-extensions) is for you.
+
## Attributions
-This plugin was made by [Alex MacCaw](http://alexmaccaw.co.uk) with major contributions from [Dmytrii Nagirniak](https://github.com/dnagir). It's under the same license as [Spine](http://spinejs.com) (MIT).
\ No newline at end of file
+This plugin was made by [Alex MacCaw](http://alexmaccaw.co.uk) with major contributions from [Dmytrii Nagirniak](https://github.com/dnagir). It's under the same license as [Spine](http://spinejs.com) (MIT).