Class Row
In: app/models/row.rb
Parent: ActiveRecord::Base

Methods

<=>   new  

Included Modules

Comparable Switch

Attributes

keys  [RW]  attr_accessor :id
table  [RW] 

Public Class methods

This method assigns the table, id, and database attributes

[Source]

    # File app/models/row.rb, line 15
15:   def initialize( table, keys )
16:     switch_ar( table.database, table.name ) do |c|
17:       c.find( :first )
18:     end
19:   end

Public Instance methods

This is our obligation to Comparable. Order by id for now

[Source]

    # File app/models/row.rb, line 24
24:   def <=>( other )
25:     self.id <=> other.id
26:   end

[Validate]