diff options
| author | hukl <contact@smyck.org> | 2009-03-21 17:39:58 +0100 |
|---|---|---|
| committer | hukl <contact@smyck.org> | 2009-03-21 17:39:58 +0100 |
| commit | c2f581ac675a869c2f0600c738332c0674a3606c (patch) | |
| tree | 7a33504cc9f82f59804c7409191798f63f2dc5a4 /app | |
| parent | 0e215fab6ef01cfe4865ed10bbe083f800c9a73e (diff) | |
only clone attributes if they are for real and not a fallback
Diffstat (limited to 'app')
| -rw-r--r-- | app/models/page.rb | 7 |
1 files 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 | |||
| 101 | I18n.available_locales.each do |l| | 101 | I18n.available_locales.each do |l| |
| 102 | next if l == :root | 102 | next if l == :root |
| 103 | I18n.locale = l | 103 | I18n.locale = l |
| 104 | self.title = page.title | 104 | page.reload |
| 105 | self.abstract = page.abstract | 105 | self.title = page.title unless page.title.try(:fallback?) |
| 106 | self.body = page.body | 106 | self.abstract = page.abstract unless page.abstract.try(:fallback?) |
| 107 | self.body = page.body unless page.body.try(:fallback?) | ||
| 107 | end | 108 | end |
| 108 | 109 | ||
| 109 | I18n.locale = locale_before | 110 | I18n.locale = locale_before |
