Commit 604f872e by ivan Lan

Update README about migration generator

parent 8b6e90da
...@@ -21,10 +21,15 @@ Or install it yourself as: ...@@ -21,10 +21,15 @@ Or install it yourself as:
$ gem install shotengai $ gem install shotengai
## Rails Generators ## Rails Generators
#Model Generator: # Migration Generator
```shell
$ rails g shotengai:migrations
```
# Model Generator:
```ruby ```ruby
# options: # options:
# --produt custom your own product class # --product custom your own product class
# --order custom your own order class # --order custom your own order class
``` ```
For example: For example:
...@@ -38,7 +43,7 @@ For example: ...@@ -38,7 +43,7 @@ For example:
create app/models/my_order.rb create app/models/my_order.rb
create app/models/my_catalog.rb create app/models/my_catalog.rb
#Controller & Routes Generator: # Controller & Routes Generator:
```ruby ```ruby
# attr: # attr:
# role ( merchant | customer ) # role ( merchant | customer )
...@@ -61,13 +66,13 @@ This will create serveral controller classes inherited from merchant product and ...@@ -61,13 +66,13 @@ This will create serveral controller classes inherited from merchant product and
content... content...
end end
#Views Generator: # Views Generator:
```shell ```shell
$ rails g shotengai:views -f $ rails g shotengai:views -f
``` ```
This will copy shotengai example views to your application under 'app/views/shotengai/'. This will copy shotengai example views to your application under 'app/views/shotengai/'.
#Spec Generator: # Spec Generator:
```shell ```shell
$ rails g shotengai:spec --customer User --merchant Merchant --product MyProduct --order Myorder $ rails g shotengai:spec --customer User --merchant Merchant --product MyProduct --order Myorder
``` ```
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment