Skip to content

Commit

Permalink
Serialize previous_text to avoid errors on save
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Sep 12, 2010
1 parent b5f955e commit 9d9eb96
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/tolk/translation.rb
Expand Up @@ -4,7 +4,7 @@ class Translation < ActiveRecord::Base

scope :containing_text, lambda {|query| where("tolk_translations.text LIKE ?", "%#{query}%") }

serialize :text
serialize :text, :previous_text
validates_presence_of :text, :if => proc {|r| r.primary.blank? && !r.explicit_nil }
validate :check_matching_variables, :if => proc { |tr| tr.primary_translation.present? }

Expand Down

0 comments on commit 9d9eb96

Please sign in to comment.