Sha256: 5353d2cdcf41c3096554da63a3d385c7caac20b6ce7f3da07116922914f534f6
Contents?: true
Size: 581 Bytes
Versions: 16
Compression:
Stored size: 581 Bytes
Contents
class ArtistsController < ApplicationController before_filter :load_artist, :only => [:edit, :update, :destroy] def index @artists = Artist.all end def new @artist = Artist.new end def create @artist = Artist.new(params[:artist]) @artist.save redirect_to edit_artist_path(@artist) end def update @artist.update_attributes(params[:artist]) redirect_to edit_artist_path(@artist) end def destroy @artist.destroy redirect_to artists_path end private def load_artist @artist = Artist.find(params[:id]) end end
Version data entries
16 entries across 16 versions & 1 rubygems