Skip to content

Loading…

Apply core globalize fix 2450. Fixes #361. #363

Merged
merged 1 commit into from

4 participants

@kenips

Same fix for 2-1-stable going to master.

@parndt parndt merged commit b03a46d into refinery:master

1 check failed

Details default The Travis CI build could not complete due to an error
@parndt
Refinery member

Thanks :smile:

@kenips kenips deleted the kenips:globalize_fix_master branch
@herrstucki

Would it be possible to publish a patch release (ie. 2.1.1) to RubyGems with this fix?

@ugisozols
Refinery member

/cc @parndt

@prokopsimek prokopsimek added a commit that referenced this pull request
@prokopsimek prokopsimek bugfix
Fixes: #367
Maybe fixes: #361 #363 #365 #342

HOW TO FIX:
1) pull this fix
2) Start rails console (rails c)
3) In rails console run command:  ::Refinery::Blog::Post.find_each(&:save)

And it should be ok. It is for me...
d927ea8
@prokopsimek prokopsimek referenced this pull request
Closed

bugfix #404

@prokopsimek prokopsimek added a commit that referenced this pull request
@prokopsimek prokopsimek bugfix
Fixes: #367
Maybe fixes: #361 #363 #365 #342

HOW TO FIX:
1) pull this fix
2) Start rails console (rails c)
3) In rails console run command:  ::Refinery::Blog::Post.find_each(&:save)

And it should be ok. It is for me...
3f1b663
@prokopsimek prokopsimek added a commit that referenced this pull request
@prokopsimek prokopsimek bugfix
Fixes: #367
Maybe fixes: #361 #363 #365 #342

HOW TO FIX:
1) pull this fix
2) Start rails console (rails c)
3) In rails console run command:  ::Refinery::Blog::Post.find_each(&:save)

And it should be ok. It is for me...
b57eebc
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Dec 8, 2013
  1. @kenips
Showing with 4 additions and 1 deletion.
  1. +4 −1 app/models/refinery/blog/post.rb
View
5 app/models/refinery/blog/post.rb
@@ -47,7 +47,10 @@ class Translation
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
Something went wrong with that request. Please try again.