diff options
author | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 17:22:18 +0400 |
---|---|---|
committer | Andrew8xx8 <avk@8xx8.ru> | 2013-02-18 17:22:18 +0400 |
commit | d27ed43daa18476b3fec6e705406c76a1b057f60 (patch) | |
tree | 59055fe6bbb18ab5aaef7742bfd07accccfb007e /app | |
parent | 557a9fa3216f003e84d66f6d6319e24bea341d0f (diff) | |
download | gitlab-ce-d27ed43daa18476b3fec6e705406c76a1b057f60.tar.gz |
Hash syntax improved
Diffstat (limited to 'app')
-rw-r--r-- | app/models/issue.rb | 4 | ||||
-rw-r--r-- | app/models/merge_request.rb | 4 | ||||
-rw-r--r-- | app/models/milestone.rb | 6 |
3 files changed, 7 insertions, 7 deletions
diff --git a/app/models/issue.rb b/app/models/issue.rb index 6c0f4da46d4..dacecbd0cea 100644 --- a/app/models/issue.rb +++ b/app/models/issue.rb @@ -25,13 +25,13 @@ class Issue < ActiveRecord::Base acts_as_taggable_on :labels - state_machine :state, :initial => :opened do + state_machine :state, initial: :opened do event :close do transition [:reopened, :opened] => :closed end event :reopen do - transition :closed => :reopened + transition closed: :reopened end state :opened diff --git a/app/models/merge_request.rb b/app/models/merge_request.rb index a980fac6f90..4a69aa919b1 100644 --- a/app/models/merge_request.rb +++ b/app/models/merge_request.rb @@ -29,7 +29,7 @@ class MergeRequest < ActiveRecord::Base attr_accessor :should_remove_source_branch - state_machine :state, :initial => :opened do + state_machine :state, initial: :opened do event :close do transition [:reopened, :opened] => :closed end @@ -39,7 +39,7 @@ class MergeRequest < ActiveRecord::Base end event :reopen do - transition :closed => :reopened + transition closed: :reopened end state :opened diff --git a/app/models/milestone.rb b/app/models/milestone.rb index 23b414467ca..d822a68dc7a 100644 --- a/app/models/milestone.rb +++ b/app/models/milestone.rb @@ -26,13 +26,13 @@ class Milestone < ActiveRecord::Base validates :title, presence: true validates :project, presence: true - state_machine :state, :initial => :active do + state_machine :state, initial: :active do event :close do - transition :active => :closed + transition active: :closed end event :activate do - transition :closed => :active + transition closed: :active end state :closed |