Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Do not try to save procs while doing sync

  • Loading branch information...
commit 11928cf51212776ab302086938c3d24ffe40ce28 1 parent 0453628
@drogus authored
Showing with 1 addition and 0 deletions.
  1. +1 −0  lib/tolk/sync.rb
View
1  lib/tolk/sync.rb
@@ -46,6 +46,7 @@ def sync_phrases(translations)
phrases = Tolk::Phrase.all
translations.each do |key, value|
+ next if value.is_a?(Proc)
# Create phrase and primary translation if missing
existing_phrase = phrases.detect {|p| p.key == key} || Tolk::Phrase.create!(:key => key)
translation = existing_phrase.translations.primary || primary_locale.translations.build(:phrase_id => existing_phrase.id)
Please sign in to comment.
Something went wrong with that request. Please try again.