diff options
author | Jason Robinson <mail@jasonrobinson.me> | 2014-01-21 01:40:07 +0400 |
---|---|---|
committer | Jason Robinson <mail@jasonrobinson.me> | 2014-01-21 01:40:07 +0400 |
commit | d5a9939c31044009aa5566ab656aef6764b64c28 (patch) | |
tree | 13f5b31ed18e706e06a93c245cd54561ae25761c | |
parent | 234ce10cf57b6b01fb20ca1357fbbb67982ffb08 (diff) | |
parent | 7bfa7292faf99dba9d76a4397681cb4289749887 (diff) |
Merge branch 'hotfix/0.3.0.1'v0.3.0.1
-rw-r--r-- | Changelog.md | 5 | ||||
-rw-r--r-- | app/models/message.rb | 5 | ||||
-rw-r--r-- | config/defaults.yml | 2 |
3 files changed, 9 insertions, 3 deletions
diff --git a/Changelog.md b/Changelog.md index 9a1c94b03..38e26bf25 100644 --- a/Changelog.md +++ b/Changelog.md @@ -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 ## Pod statistics diff --git a/app/models/message.rb b/app/models/message.rb index c0bbcb38a..60de53d3d 100644 --- a/app/models/message.rb +++ b/app/models/message.rb @@ -11,13 +11,14 @@ class Message < ActiveRecord::Base belongs_to :author, :class_name => 'Person' belongs_to :conversation, :touch => true - + delegate :name, to: :author, prefix: true validates :text, :presence => true 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 self.author_signature = self.sign_with_key(self.author.owner.encryption_key) if self.author.owner diff --git a/config/defaults.yml b/config/defaults.yml index d000938f8..d798a4155 100644 --- a/config/defaults.yml +++ b/config/defaults.yml @@ -4,7 +4,7 @@ defaults: 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 environment: url: "http://localhost:3000/" |