mirror of
https://github.com/codeninjasllc/discourse.git
synced 2024-11-24 16:18:42 -05:00
12 lines
254 B
Ruby
12 lines
254 B
Ruby
|
module LimitedEdit
|
||
|
extend ActiveSupport::Concern
|
||
|
|
||
|
def edit_time_limit_expired?
|
||
|
if created_at && SiteSetting.post_edit_time_limit.to_i > 0
|
||
|
created_at < SiteSetting.post_edit_time_limit.to_i.minutes.ago
|
||
|
else
|
||
|
false
|
||
|
end
|
||
|
end
|
||
|
end
|