Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Boxiang Sun
gitlab-ce
Commits
d27ed43d
Commit
d27ed43d
authored
Feb 18, 2013
by
Andrew8xx8
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Hash syntax improved
parent
557a9fa3
Changes
3
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
7 deletions
+7
-7
app/models/issue.rb
app/models/issue.rb
+2
-2
app/models/merge_request.rb
app/models/merge_request.rb
+2
-2
app/models/milestone.rb
app/models/milestone.rb
+3
-3
No files found.
app/models/issue.rb
View file @
d27ed43d
...
@@ -25,13 +25,13 @@ class Issue < ActiveRecord::Base
...
@@ -25,13 +25,13 @@ class Issue < ActiveRecord::Base
acts_as_taggable_on
:labels
acts_as_taggable_on
:labels
state_machine
:state
,
:initial
=>
:opened
do
state_machine
:state
,
initial:
:opened
do
event
:close
do
event
:close
do
transition
[
:reopened
,
:opened
]
=>
:closed
transition
[
:reopened
,
:opened
]
=>
:closed
end
end
event
:reopen
do
event
:reopen
do
transition
:closed
=>
:reopened
transition
closed:
:reopened
end
end
state
:opened
state
:opened
...
...
app/models/merge_request.rb
View file @
d27ed43d
...
@@ -29,7 +29,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -29,7 +29,7 @@ class MergeRequest < ActiveRecord::Base
attr_accessor
:should_remove_source_branch
attr_accessor
:should_remove_source_branch
state_machine
:state
,
:initial
=>
:opened
do
state_machine
:state
,
initial:
:opened
do
event
:close
do
event
:close
do
transition
[
:reopened
,
:opened
]
=>
:closed
transition
[
:reopened
,
:opened
]
=>
:closed
end
end
...
@@ -39,7 +39,7 @@ class MergeRequest < ActiveRecord::Base
...
@@ -39,7 +39,7 @@ class MergeRequest < ActiveRecord::Base
end
end
event
:reopen
do
event
:reopen
do
transition
:closed
=>
:reopened
transition
closed:
:reopened
end
end
state
:opened
state
:opened
...
...
app/models/milestone.rb
View file @
d27ed43d
...
@@ -26,13 +26,13 @@ class Milestone < ActiveRecord::Base
...
@@ -26,13 +26,13 @@ class Milestone < ActiveRecord::Base
validates
:title
,
presence:
true
validates
:title
,
presence:
true
validates
:project
,
presence:
true
validates
:project
,
presence:
true
state_machine
:state
,
:initial
=>
:active
do
state_machine
:state
,
initial:
:active
do
event
:close
do
event
:close
do
transition
:active
=>
:closed
transition
active:
:closed
end
end
event
:activate
do
event
:activate
do
transition
:closed
=>
:active
transition
closed:
:active
end
end
state
:closed
state
:closed
...
...
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