Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Removed the ability to CRUD.

  • Loading branch information...
commit ddd6986df69da5fe6e3dc7cb51051ef0b564272e 1 parent 8b240bb
@muffs authored
View
60 app/controllers/charts_controller.rb
@@ -56,64 +56,4 @@ def showSongs
format.xml { render :xml => @songs }
end
end
-
- # GET /charts/new
- # GET /charts/new.xml
- def new
- @chart = Chart.new
-
- respond_to do |format|
- format.html # new.html.erb
- format.xml { render :xml => @chart }
- end
- end
-
- # GET /charts/1/edit
- def edit
- @chart = Chart.find(params[:id])
- end
-
- # POST /charts
- # POST /charts.xml
- def create
- @chart = Chart.new(params[:chart])
-
- respond_to do |format|
- if @chart.save
- format.html { redirect_to(@chart, :notice => 'Chart was successfully created.') }
- format.xml { render :xml => @chart, :status => :created, :location => @chart }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @chart.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # PUT /charts/1
- # PUT /charts/1.xml
- def update
- @chart = Chart.find(params[:id])
-
- respond_to do |format|
- if @chart.update_attributes(params[:chart])
- format.html { redirect_to(@chart, :notice => 'Chart was successfully updated.') }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @chart.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # DELETE /charts/1
- # DELETE /charts/1.xml
- def destroy
- @chart = Chart.find(params[:id])
- @chart.destroy
-
- respond_to do |format|
- format.html { redirect_to(charts_url) }
- format.xml { head :ok }
- end
- end
end
View
49 app/controllers/songs_controller.rb
@@ -31,53 +31,4 @@ def new
format.xml { render :xml => @song }
end
end
-
- # GET /songs/1/edit
- def edit
- @song = Song.find(params[:id])
- end
-
- # POST /songs
- # POST /songs.xml
- def create
- @song = Song.new(params[:song])
-
- respond_to do |format|
- if @song.save
- format.html { redirect_to(@song, :notice => 'Song was successfully created.') }
- format.xml { render :xml => @song, :status => :created, :location => @song }
- else
- format.html { render :action => "new" }
- format.xml { render :xml => @song.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # PUT /songs/1
- # PUT /songs/1.xml
- def update
- @song = Song.find(params[:id])
-
- respond_to do |format|
- if @song.update_attributes(params[:song])
- format.html { redirect_to(@song, :notice => 'Song was successfully updated.') }
- format.xml { head :ok }
- else
- format.html { render :action => "edit" }
- format.xml { render :xml => @song.errors, :status => :unprocessable_entity }
- end
- end
- end
-
- # DELETE /songs/1
- # DELETE /songs/1.xml
- def destroy
- @song = Song.find(params[:id])
- @song.destroy
-
- respond_to do |format|
- format.html { redirect_to(songs_url) }
- format.xml { head :ok }
- end
- end
end
Please sign in to comment.
Something went wrong with that request. Please try again.