GitlabSerialize: cause of invalid yaml in some events we migrate to json serialization

This commit is contained in:
Dmitriy Zaporozhets 2012-04-04 02:25:33 +03:00
parent 8aa5076d68
commit a951e6f8ae
4 changed files with 36 additions and 13 deletions

View file

@ -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?