Class: Deals::PlacesController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/places_controller.rb

Instance Method Summary collapse

Instance Method Details

#indexObject



4
5
6
7
# File 'app/controllers/places_controller.rb', line 4

def index
  @places = Place.all.map { |p| { 'id' => p.id, :name => p.name, :slug => p.slug} }
  respond_with(@places)
end