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
f54e92e0
Commit
f54e92e0
authored
Oct 10, 2017
by
ivan Lan
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix the create of system order log
parent
ee4072cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
20 additions
and
4 deletions
+20
-4
aasm_dlc.rb
lib/shotengai/aasm_dlc.rb
+16
-0
order.rb
lib/shotengai/order.rb
+4
-4
No files found.
lib/shotengai/aasm_dlc.rb
View file @
f54e92e0
...
...
@@ -4,6 +4,7 @@ module Shotengai
def
self
.
included
(
base
)
add_event_callbacks
base
.
include
AASM
# base.extend Shotengai::AASM_DLC::ClassMethods
end
def
self
.
add_event_callbacks
...
...
@@ -45,5 +46,20 @@ module Shotengai
end
end
# module ClassMethods
# def aasm *arg, &block
# super(*arg, &block)
# # @aasm[:default].instance_eval(&@aasm_patch) if @aasm_patch # new DSL
# # @aasm_patch = nil
# # p '-------'
# # sleep 1
# # @aasm[:default]
# end
# def add_aasm_patch &block
# @aasm[:default].instance_eval(&@block)
# end
# end
end
end
lib/shotengai/order.rb
View file @
f54e92e0
...
...
@@ -94,19 +94,19 @@ module Shotengai
end
def
set_pay_time
self
.
update!
(
pay_time:
Time
.
now
)
update_column
(
:pay_time
,
Time
.
now
)
end
def
set_delivery_time
update
!
(
delivery_time:
Time
.
now
)
update
_column
(
:delivery_time
,
Time
.
now
)
end
def
set_receipt_time
update
!
(
receipt_time:
Time
.
now
)
update
_column
(
:receipt_time
,
Time
.
now
)
end
def
set_seq
self
.
update!
(
seq:
create_seq
)
update_column
(
:seq
,
create_seq
)
end
def
create_seq
...
...
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