Module: ROM::Plugins::Relation::SQL::BaseView

Defined in:
lib/rom/plugins/relation/sql/base_view.rb

Class Method Summary collapse

Class Method Details

.included(klass) ⇒ Object

This method is part of a private API. You should avoid using this method if possible, as it may be removed or be changed in the future.



7
8
9
10
11
12
13
14
15
16
17
18
# File 'lib/rom/plugins/relation/sql/base_view.rb', line 7

def self.included(klass)
  super
  klass.class_eval do
    def self.inherited(other)
      super
      other.view(:base) do
        header { dataset.columns }
        relation { select(*attributes(:base)).order(primary_key) }
      end
    end
  end
end