From c2f581ac675a869c2f0600c738332c0674a3606c Mon Sep 17 00:00:00 2001 From: hukl Date: Sat, 21 Mar 2009 17:39:58 +0100 Subject: only clone attributes if they are for real and not a fallback --- app/models/page.rb | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/app/models/page.rb b/app/models/page.rb index af820e3..4c4536e 100644 --- a/app/models/page.rb +++ b/app/models/page.rb @@ -101,9 +101,10 @@ class Page < ActiveRecord::Base I18n.available_locales.each do |l| next if l == :root I18n.locale = l - self.title = page.title - self.abstract = page.abstract - self.body = page.body + page.reload + self.title = page.title unless page.title.try(:fallback?) + self.abstract = page.abstract unless page.abstract.try(:fallback?) + self.body = page.body unless page.body.try(:fallback?) end I18n.locale = locale_before -- cgit v1.3