Class: Renalware::Letters::DescriptionsController::DescriptionAutocompleteResponse

Inherits:
Object
  • Object
show all
Defined in:
app/controllers/renalware/letters/descriptions_controller.rb

Class Method Summary collapse

Class Method Details

.to_json(collection) ⇒ Object



14
15
16
17
18
# File 'app/controllers/renalware/letters/descriptions_controller.rb', line 14

def self.to_json(collection)
  collection.map do |item|
    { id: item.id, label: item.text }
  end.to_json
end