Add setter for excerpt_size so plugins can set it more easily

This commit is contained in:
Robin Ward 2019-10-21 13:44:14 -04:00
parent 40b0b549ff
commit ab53b485b4

View File

@ -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?