Реализация Page и DataCardWidget
This commit is contained in:
@@ -0,0 +1,3 @@
|
||||
class ApplicationRecord < ActiveRecord::Base
|
||||
primary_abstract_class
|
||||
end
|
||||
@@ -0,0 +1,6 @@
|
||||
class Channel < ApplicationRecord
|
||||
self.table_name = "channels"
|
||||
self.inheritance_column = nil
|
||||
|
||||
has_many :histories, -> { order(event_date: :asc) }
|
||||
end
|
||||
@@ -0,0 +1,5 @@
|
||||
class History < ApplicationRecord
|
||||
self.table_name = "histories"
|
||||
|
||||
belongs_to :channel
|
||||
end
|
||||
Reference in New Issue
Block a user