Module: ApiHandling

Included in:
Event, Location, Material, Participant, Topic, User
Defined in:
app/concerns/api_handling.rb

Instance Method Summary collapse

Instance Method Details

#expose_api(*fields) ⇒ Object


2
3
4
5
6
7
8
# File 'app/concerns/api_handling.rb', line 2

def expose_api(*fields)
  acts_as_api

  api_accessible :ios_v1 do |template|
    fields.each { |field| template.add field }
  end
end