README.md in gdatastore_mapper-0.1.2 vs README.md in gdatastore_mapper-0.1.3
- old
+ new
@@ -1,15 +1,40 @@
# GdatastoreMapper
GdatastoreMapper is a mapper framework for Google Cloud Datastore in Ruby / Ruby on Rails.
Once you install GdatastoreMapper you can use Google Cloud Datastore like ActiveRecord.
+## Table of Contents
+- [Requirements](#requirements)
+- [Installation](#installation)
+- [Configuration](#configuration)
+- [Model Setting](#model-setting)
+- [Persistence Methods](#persistence-methods)
+- [Scoping Methods](#scoping-methods)
+- [Timestamp](#timestamp)
+- [Associations](#associations)
+ - [One to Many](#one-to-many)
+- [Development](#development)
+
+## Requirements
+
+GdatastoreMapper requires Rails version >= 4.2 (of course it's working for Rails 5)
+
+google-cloud >= 0.27
+
+
## Installation
+Execute rails new with --skip-active-record
+```
+$ rails new your_project --skip-active-record
+```
+
Add this line to your application's Gemfile:
```ruby
+gem 'google-cloud'
gem 'gdatastore_mapper'
```
And then execute:
@@ -38,18 +63,18 @@
test:
dataset_id: your-google-cloud-platform-project-id
emulator_host: localhost:8444
```
-## Usage
+## Model Setting
Only 2 things you need to do.
1. To include GdatastoreMapper
2. To set attr_accessor as column
-That's it!
+That's it! No need to db:migrate.
```ruby
class Book
include GdatastoreMapper::Base
@@ -119,9 +144,11 @@
## Timestamp
All records have created_at and updated_at. They will be updated automatically.
## Associations
+
+### One to Many
example of one to many relationship
```ruby
class Book