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