mirror of
https://github.com/discourse/discourse.git
synced 2025-01-19 03:12:46 +08:00
Add setter for excerpt_size
so plugins can set it more easily
This commit is contained in:
parent
40b0b549ff
commit
ab53b485b4
|
@ -157,8 +157,12 @@ class Post < ActiveRecord::Base
|
|||
includes(:post_details).find_by(post_details: { key: key, value: value })
|
||||
end
|
||||
|
||||
def self.excerpt_size=(sz)
|
||||
@excerpt_size = sz
|
||||
end
|
||||
|
||||
def self.excerpt_size
|
||||
220
|
||||
@excerpt_size || 220
|
||||
end
|
||||
|
||||
def whisper?
|
||||
|
|
Loading…
Reference in New Issue
Block a user