Commit d27ed43d authored by Andrew8xx8's avatar Andrew8xx8

Hash syntax improved

parent 557a9fa3
No related merge requests found
......@@ -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
......
......@@ -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
......
......@@ -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
......
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