Commit d27ed43d authored by Andrew8xx8's avatar Andrew8xx8

Hash syntax improved

parent 557a9fa3
...@@ -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
......
...@@ -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
......
...@@ -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
......
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