aboutsummaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
Diffstat (limited to 'app')
-rw-r--r--app/models/refinery/blog/post.rb5
1 files changed, 4 insertions, 1 deletions
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb
index f0278f4..cf0a526 100644
--- a/app/models/refinery/blog/post.rb
+++ b/app/models/refinery/blog/post.rb
@@ -47,7 +47,10 @@ module Refinery
seo_fields = ::SeoMeta.attributes.keys.map{|a| [a, :"#{a}="]}.flatten
delegate(*(seo_fields << {:to => :translation}))
- before_save { |m| m.translation.save }
+ before_save do |m|
+ m.translation.globalized_model = self
+ m.translation.save if m.translation.new_record?
+ end
self.per_page = Refinery::Blog.posts_per_page