Class: Droom::Api::VenuesController

Inherits:
ApiController show all
Defined in:
app/controllers/droom/api/venues_controller.rb

Instance Method Summary collapse

Methods inherited from ApiController

#current_ability

Methods inherited from EngineController

#current_ability

Instance Method Details

#createObject



21
22
23
# File 'app/controllers/droom/api/venues_controller.rb', line 21

def create
  render json: @venue
end

#destroyObject



25
26
27
28
# File 'app/controllers/droom/api/venues_controller.rb', line 25

def destroy
  @venue.destroy
  head :ok
end

#indexObject

after_filter :set_pagination_headers, only: [:index]



8
9
10
# File 'app/controllers/droom/api/venues_controller.rb', line 8

def index
  render json: @venues
end

#showObject



12
13
14
# File 'app/controllers/droom/api/venues_controller.rb', line 12

def show
  render json: @venue
end

#updateObject



16
17
18
19
# File 'app/controllers/droom/api/venues_controller.rb', line 16

def update
  @venue.update_attributes(venue_params)
  render json: @venue
end