README.md in ar2gostruct-0.1.1 vs README.md in ar2gostruct-0.2.0
- old
+ new
@@ -1,7 +1,8 @@
# Ar2gostruct
[![Gem Version](https://badge.fury.io/rb/ar2gostruct.png)](https://rubygems.org/gems/ar2gostruct)
+[![Build Status](https://travis-ci.org/t-k/ar2gostruct.png)](https://travis-ci.org/t-k/ar2gostruct)
Automatically generate Golang Struct from your activerecord models.
Installation
---
@@ -21,13 +22,14 @@
Usage
---
On your rails directory.
```bash
-bundle exec rake ar2gostruct
+bundle exec rake ar2gostruct association=true
+# association option enables Active Record Associations (Needs ar2gostruct v0.2.0 or greater).
# or
-ar2gostruct
+bundle exec ar2gostruct --a
```
this will returns
```bash
// app/models/user.rb
// Table name: users
@@ -47,13 +49,15 @@
ConfirmedAt time.Time `json:"confirmed_at"`
ConfirmationSentAt time.Time `json:"confirmation_sent_at"`
UnconfirmedEmail string `json:"unconfirmed_email"`
CreatedAt time.Time `json:"created_at"`
UpdatedAt time.Time `json:"updated_at"`
+ Profile Profile `json:"profile"`
+ Projects []Project `json:"projects"`
}
```
-If you're using [qbs](https://github.com/coocood/qbs#), Additional options are available.
+If you're using [qbs](https://github.com/coocood/qbs#) or [gorm](https://github.com/jinzhu/gorm), Additional options are available.
```bash
bundle exec rake ar2gostruct orm=qbs
# or
ar2gostruct -o qbs