Class: Io::ActiveRecord::Relation

Inherits:
Object
  • Object
show all
Extended by:
Core::Io::Collection
Defined in:
app/api/io/active_record/relation.rb

Overview

rubocop:todo Style/Documentation

Class Method Summary collapse

Class Method Details

.as_json(options = {}) ⇒ Object


5
6
7
8
9
# File 'app/api/io/active_record/relation.rb', line 5

def as_json(options = {})
  options[:handled_by].generate_json_actions(options[:object],
                                             options.merge(target: options[:response].request.target))
  super
end

.size_for(results) ⇒ Object


11
12
13
# File 'app/api/io/active_record/relation.rb', line 11

def size_for(results)
  results.total_entries
end