Permalink
Browse files

Corrections for saving and new validation setup

  • Loading branch information...
1 parent a67d685 commit 1c6979131ae4ee50ab863cde43f961daccba908c @samlown committed Jan 21, 2011
Showing with 3 additions and 2 deletions.
  1. +3 −2 lib/translate_columns.rb
View
5 lib/translate_columns.rb
@@ -185,10 +185,11 @@ def translation
# be used.
#
def save_with_translation(*args)
+ perform_validation = args.is_a?(Hash) ? args[:validate] : args
if perform_validation && valid? || !perform_validation
- translation.save(false) if (translation)
+ translation.save(*args) if (translation)
disable_translation
- save_without_translation(false)
+ save_without_translation(*args)
enable_translation
true
else

0 comments on commit 1c69791

Please sign in to comment.