Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
S
shotengai
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
open-source
shotengai
Commits
669ae57d
Commit
669ae57d
authored
Oct 02, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Change the address of order into a json colum
parent
a1bf8cc1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
2 additions
and
2 deletions
+2
-2
1_create_shotengai_products_and_orders.rb
db/migrate/1_create_shotengai_products_and_orders.rb
+1
-1
base.rb
lib/shotengai/controller/base.rb
+0
-1
web_error.rb
lib/shotengai/web_error.rb
+1
-0
No files found.
db/migrate/1_create_shotengai_products_and_orders.rb
View file @
669ae57d
...
@@ -51,7 +51,7 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
...
@@ -51,7 +51,7 @@ class CreateShotengaiProductsAndOrders < ActiveRecord::Migration[5.1]
def
create_order
def
create_order
create_table
:shotengai_orders
do
|
t
|
create_table
:shotengai_orders
do
|
t
|
t
.
string
:seq
t
.
string
:seq
t
.
string
:address
t
.
json
:address
t
.
decimal
:amount
,
precision:
9
,
scale:
2
t
.
decimal
:amount
,
precision:
9
,
scale:
2
t
.
datetime
:pay_time
t
.
datetime
:pay_time
t
.
datetime
:delivery_time
t
.
datetime
:delivery_time
...
...
lib/shotengai/controller/base.rb
View file @
669ae57d
...
@@ -48,7 +48,6 @@ module Shotengai
...
@@ -48,7 +48,6 @@ module Shotengai
end
end
before_action
:set_resource
,
except:
[
:index
,
:create
]
before_action
:set_resource
,
except:
[
:index
,
:create
]
respond_to
:json
# TODO: could not catch the exception
# TODO: could not catch the exception
respond_to
:json
respond_to
:json
...
...
lib/shotengai/web_error.rb
View file @
669ae57d
...
@@ -2,6 +2,7 @@ module Shotengai
...
@@ -2,6 +2,7 @@ module Shotengai
class
WebError
<
RuntimeError
class
WebError
<
RuntimeError
attr_accessor
:message
,
:code
,
:status
attr_accessor
:message
,
:code
,
:status
def
initialize
message
,
code
,
status
def
initialize
message
,
code
,
status
super
()
@message
,
@code
,
@status
=
message
,
code
,
status
@message
,
@code
,
@status
=
message
,
code
,
status
end
end
end
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment