Skip to content
Browse files

Dont use deprecated before_validation_on_update

  • Loading branch information...
1 parent f235e90 commit 08dc20bdb5efc8ecb97831194b4bc7ab6fd9eb4c @lifo lifo committed
Showing with 1 addition and 1 deletion.
  1. +1 −1 app/models/tolk/locale.rb
View
2 app/models/tolk/locale.rb
@@ -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"

0 comments on commit 08dc20b

Please sign in to comment.
Something went wrong with that request. Please try again.