2019-05-02 18:17:27 -04:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2015-02-25 14:53:21 -05:00
|
|
|
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
|