Skip to content

Commit

Permalink
Dont use deprecated before_validation_on_update
Browse files Browse the repository at this point in the history
  • Loading branch information
lifo committed Jun 2, 2010
1 parent f235e90 commit 08dc20b
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion app/models/tolk/locale.rb
Expand Up @@ -53,7 +53,7 @@ class Locale < ActiveRecord::Base
has_many :phrases, :through => :translations, :class_name => 'Tolk::Phrase'
has_many :translations, :class_name => 'Tolk::Translation', :dependent => :destroy
accepts_nested_attributes_for :translations, :reject_if => proc { |attributes| attributes['text'].blank? }
before_validation_on_update :remove_invalid_translations_from_target
before_validation :remove_invalid_translations_from_target, :on => :update

cattr_accessor :locales_config_path
self.locales_config_path = "#{Rails.root}/config/locales"
Expand Down

0 comments on commit 08dc20b

Please sign in to comment.