Sha256: 3813316e402eac7372d74362ab96a8dddff0550e703385c4f5cc0137979b41e4

Contents?: true

Size: 560 Bytes

Versions: 16

Compression:

Stored size: 560 Bytes

Contents

class PlacesController < ApplicationController
  before_filter :load_place, :only => [:edit, :update, :destroy]

  def index
    @places = Place.all
  end

  def new
    @place = Place.new
  end

  def create
    @place = Place.new(params[:place])
    @place.save

    redirect_to edit_place_path(@place)
  end

  def update
    @place.update_attributes(params[:place])
    redirect_to edit_place_path(@place)
  end

  def destroy
    @place.destroy
    redirect_to places_path
  end

  private

  def load_place
    @place = Place.find(params[:id])
  end
end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
attachment_magick-0.3.6 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3.5 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3.4 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3.3 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3.2 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3.1 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.3 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.7 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.6 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.5 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.4 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.3 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.2 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.1 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.2.0 test/dummy/app/controllers/places_controller.rb
attachment_magick-0.1.0 test/dummy/app/controllers/places_controller.rb