with_panels.find_index.where(Panel.arel_table[:id].eq panel_id).references(:panel)
end
- scope :find_play, -> (id) do
- with_panels.find_index.where(id: id).references(:scroll_panels)
+ # scope of find_play
+ def self.find_play(id)
+ ScrollPanel.find_play(id)
end
- scope :find_private_play, -> (id, operators) do
- with_panels.find_private(operators).where(self.arel_table[:id].eq id).references(:scroll_panels)
+ # scope of find_private_play
+ def self.find_private_play(id, operators)
+ ScrollPanel.find_private_play(id, operators)
end
def supply_default