@song.font_size = Song.default_font_size
end
+ def show
+ @song = Song.find params[:id]
+ end
+
def create
- render :action => :new unless params[:song]
+ return render :action => :new unless params[:song]
@song = Song.new(params[:song])
unless @song.valid?
p @song.errors
redirect_to songs_path if @song.blank?
end
+ def update
+ @song = Song.active.find_by_id(params[:id])
+ @song.attributes = params[:song]
+ @song.save
+ return redirect_to :action => :edit
+ end
+
def list
@songs = Song.active.all
end