Skip to content

Commit

Permalink
Do not try to save procs while doing sync
Browse files Browse the repository at this point in the history
  • Loading branch information
drogus committed Apr 27, 2012
1 parent 0453628 commit 11928cf
Showing 1 changed file with 1 addition and 0 deletions.
1 change: 1 addition & 0 deletions lib/tolk/sync.rb
Expand Up @@ -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)
Expand Down

0 comments on commit 11928cf

Please sign in to comment.