Class: Io::ActiveRecord::Relation

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

Class Method Summary collapse

Class Method Details

.as_json(options = {}) ⇒ Object


5
6
7
8
# 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


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

def size_for(results)
  results.total_entries
end