Sha256: 684830957951ed4ddccbc38c2602a1d5c90a7fb555f0dcd44862ad84e4a1d038
Contents?: true
Size: 358 Bytes
Versions: 1
Compression:
Stored size: 358 Bytes
Contents
class ActiveRecordView < Flexirails::View def query offset, limit scope = if order_results? Person.order("#{order} #{direction}") else Person end scope.offset(offset).limit(limit) end def total Person.count end def sortable_columns %w(id firstname lastname) end def columns sortable_columns end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
flexirails-0.1.0 | test/dummy/app/models/active_record_view.rb |