GitlabSerialize: cause of invalid yaml in some events we migrate to json serialization
This commit is contained in:
parent
8aa5076d68
commit
a951e6f8ae
4 changed files with 36 additions and 13 deletions
|
@ -14,7 +14,7 @@ class Event < ActiveRecord::Base
|
|||
belongs_to :project
|
||||
belongs_to :target, :polymorphic => true
|
||||
|
||||
serialize :data
|
||||
serialize :data, GitlabSerialize.new
|
||||
|
||||
scope :recent, order("created_at DESC")
|
||||
scope :code_push, where(:action => Pushed)
|
||||
|
@ -36,7 +36,7 @@ class Event < ActiveRecord::Base
|
|||
end
|
||||
|
||||
def push?
|
||||
action == self.class::Pushed
|
||||
action == self.class::Pushed && valid_push?
|
||||
end
|
||||
|
||||
def merged?
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue