diff options
author | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-22 21:39:53 +0200 |
---|---|---|
committer | Eugen Rochko <eugen@zeonfederated.com> | 2016-09-22 21:39:53 +0200 |
commit | c6d893a71dede65dd88a0dfac81178c8e81e27d2 (patch) | |
tree | bb557a00fc8be550f32bec792be4530dc0729643 /app/models | |
parent | b1a670af8d098c33a8938662f5c0bd60674ea683 (diff) |
Uploading/undoing media modifies status text. Also: status text trimmed before validation
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/status.rb | 4 |
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/status.rb b/app/models/status.rb index e336cfe62..ae5c4b496 100644 --- a/app/models/status.rb +++ b/app/models/status.rb @@ -89,4 +89,8 @@ class Status < ApplicationRecord def self.reblogs_map(status_ids, account_id) self.where(reblog_of_id: status_ids).where(account_id: account_id).map { |s| [s.reblog_of_id, true] }.to_h end + + before_validation do + self.text.strip! + end end |