diff options
Diffstat (limited to 'app')
-rw-r--r-- | app/models/message.rb | 4 |
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 |