diff options
author | Philip Arndt <parndt@gmail.com> | 2012-11-23 10:04:26 +1300 |
---|---|---|
committer | Philip Arndt <parndt@gmail.com> | 2012-11-23 10:04:26 +1300 |
commit | b3db311954cdf10d29d998da88c20098dce6e53c (patch) | |
tree | 73f0d40f80475f5d3b7271b67dd1a838bc3006b4 /app/models | |
parent | ea4f309589171ad797b362acdc1d5dc89faf1e8f (diff) | |
parent | 5f9b151d01938dde5f5f2716dc3a0de75b02e5d9 (diff) | |
download | refinerycms-blog-b3db311954cdf10d29d998da88c20098dce6e53c.tar.gz refinerycms-blog-b3db311954cdf10d29d998da88c20098dce6e53c.tar.bz2 refinerycms-blog-b3db311954cdf10d29d998da88c20098dce6e53c.zip |
Merge remote-tracking branch 'jerefrer/master'
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/refinery/blog/post.rb | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/app/models/refinery/blog/post.rb b/app/models/refinery/blog/post.rb index 881a4ec..4ee009e 100644 --- a/app/models/refinery/blog/post.rb +++ b/app/models/refinery/blog/post.rb @@ -45,6 +45,12 @@ module Refinery attr_accessible :browser_title, :meta_description, :meta_keywords, :locale end + # Delegate SEO Attributes to globalize3 translation + seo_fields = ::SeoMeta.attributes.keys.map{|a| [a, :"#{a}="]}.flatten + delegate(*(seo_fields << {:to => :translation})) + + before_save { |m| m.translation.save } + self.per_page = Refinery::Blog.posts_per_page def next |