blob: 688f1080069b66163a452e58b3c51ff9c961ebcc (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
module Api
module V1
class SwitchboardEntriesController < ApplicationController
respond_to :json
def index
if params[:ids]
@switchboard_entries = SwitchboardEntry.where(:id => params[:ids])
else
@switchboard_entries = SwitchboardEntry.all
end
respond_with @switchboard_entries
end
def show
@switchboard_entry = SwitchboardEntry.find(params[:id])
respond_with @switchboard_entry
end
end
end
end
|