Class: BridgeCache::BridgeBaseModel
- Inherits:
-
ActiveRecord::Base
- Object
- ActiveRecord::Base
- BridgeCache::BridgeBaseModel
show all
- Defined in:
- app/models/bridge_cache/bridge_base_model.rb
Direct Known Subclasses
AffiliatedSubAccount, ApplicationRecord, CourseTemplate, CustomField, Domain, Enrollment, Grant, Group, LiveCourse, LiveCourseEnrollment, LiveCourseSession, LiveCourseSessionRegistration, Program, ProgramEnrollment, ProgramGroupEnrollment, ProgramItem, Tag, Tagging, User
Instance Method Summary
collapse
Instance Method Details
#adjusted_table_name ⇒ Object
13
14
15
16
17
18
19
|
# File 'app/models/bridge_cache/bridge_base_model.rb', line 13
def adjusted_table_name
if BridgeCache.use_internal_database
table_name
else
self.to_s.demodulize.underscore.pluralize
end
end
|
#bridge_id ⇒ Object
5
6
7
8
9
10
11
|
# File 'app/models/bridge_cache/bridge_base_model.rb', line 5
def bridge_id
if self.class.column_names.include? "bridge_id"
self[:bridge_id]
else
id
end
end
|