mirror of
https://github.com/discourse/discourse.git
synced 2025-03-06 11:19:51 +00: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 })
|
includes(:post_details).find_by(post_details: { key: key, value: value })
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def self.excerpt_size=(sz)
|
||||||
|
@excerpt_size = sz
|
||||||
|
end
|
||||||
|
|
||||||
def self.excerpt_size
|
def self.excerpt_size
|
||||||
220
|
@excerpt_size || 220
|
||||||
end
|
end
|
||||||
|
|
||||||
def whisper?
|
def whisper?
|
||||||
|
Loading…
x
Reference in New Issue
Block a user