mirror of
https://gitlink.org.cn/Gitlink/forgeplus.git
synced 2026-05-03 03:40:49 +08:00
init project
This commit is contained in:
19
app/models/application_record.rb
Normal file
19
app/models/application_record.rb
Normal file
@@ -0,0 +1,19 @@
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
include NumberDisplayHelper
|
||||
|
||||
attr_accessor :_extra_data
|
||||
|
||||
self.abstract_class = true
|
||||
|
||||
def format_time(time)
|
||||
time.present? ? time.strftime('%Y-%m-%d %H:%M') : ''
|
||||
end
|
||||
|
||||
def display_extra_data(key)
|
||||
_extra_data&.[](key)
|
||||
end
|
||||
|
||||
def allow_sync_to_trustie?
|
||||
Rails.env.production? && EduSetting.get('host_name') == 'https://www.educoder.net'
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user