summaryrefslogtreecommitdiffstats
path: root/app
diff options
context:
space:
mode:
authorJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-14 09:19:20 +0000
committerJean-Philippe Lang <jp_lang@yahoo.fr>2009-06-14 09:19:20 +0000
commit7642b5a9ab180aaedee24c6b4e38eb28cafd00b3 (patch)
treed7fb81525f680c62019c425ae29ecde4149e7b7f /app
parent5e76040256c4a86485caf010cc9c9c8329e7aafa (diff)
downloadredmine-7642b5a9ab180aaedee24c6b4e38eb28cafd00b3.tar.gz
redmine-7642b5a9ab180aaedee24c6b4e38eb28cafd00b3.zip
Fixed: editing a message may cause sticky attribute to be NULL (#3356).
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2787 e93f8b46-1217-0410-a6f0-8f06a7374b81
Diffstat (limited to 'app')
-rw-r--r--app/models/message.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/message.rb b/app/models/message.rb
index 92bcb1275..f37413286 100644
--- a/app/models/message.rb
+++ b/app/models/message.rb
@@ -66,6 +66,10 @@ class Message < ActiveRecord::Base
board.reset_counters!
end
+ def sticky=(arg)
+ write_attribute :sticky, (arg == true || arg.to_s == '1' ? 1 : 0)
+ end
+
def sticky?
sticky == 1
end