Merge branch 'hotfix/0.3.0.1'

This commit is contained in:
Jason Robinson 2014-01-20 23:40:07 +02:00
commit d5a9939c31
3 changed files with 9 additions and 3 deletions

View file

@ -1,3 +1,8 @@
# 0.3.0.1
## Bug fixes
* Fix regression caused by using after_commit with nested '#save' which lead to an infinite recursion [#4715](https://github.com/diaspora/diaspora/issues/4715)
# 0.3.0.0 # 0.3.0.0
## Pod statistics ## Pod statistics

View file

@ -11,13 +11,14 @@ class Message < ActiveRecord::Base
belongs_to :author, :class_name => 'Person' belongs_to :author, :class_name => 'Person'
belongs_to :conversation, :touch => true belongs_to :conversation, :touch => true
delegate :name, to: :author, prefix: true delegate :name, to: :author, prefix: true
validates :text, :presence => true validates :text, :presence => true
validate :participant_of_parent_conversation validate :participant_of_parent_conversation
after_commit :on => :create do after_create do # don't use 'after_commit' here since there is a call to 'save!'
# inside, which would cause an infinite recursion
#sign comment as commenter #sign comment as commenter
self.author_signature = self.sign_with_key(self.author.owner.encryption_key) if self.author.owner self.author_signature = self.sign_with_key(self.author.owner.encryption_key) if self.author.owner

View file

@ -4,7 +4,7 @@
defaults: defaults:
version: version:
number: "0.3.0.0" # Do not touch unless doing a release, do not backport the version number that's in master but keep develp to always say "head" number: "0.3.0.1" # Do not touch unless doing a release, do not backport the version number that's in master but keep develop to always say "head"
heroku: false heroku: false
environment: environment:
url: "http://localhost:3000/" url: "http://localhost:3000/"