-class NoteController < ApplicationController
+class NotesController < ApplicationController
layout 'site', :only => [:mine]
##
# Return a list of notes in a given area
- def list
+ def index
# Figure out the bbox - we prefer a bbox argument but also
# support the old, deprecated, method with four arguments
if params[:bbox]
##
# Add a comment to an existing note
- def update
+ def comment
# Check the arguments are sane
raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
raise OSM::APIBadUserInput.new("No text was given") unless params[:text]
##
# Get a feed of recent notes and comments
- def rss
+ def feed
# Get any conditions that need to be applied
notes = closed_condition(Note.scoped)
##
# Read a note
- def read
+ def show
# Check the arguments are sane
raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
##
# Delete (hide) a note
- def delete
+ def destroy
# Check the arguments are sane
raise OSM::APIBadUserInput.new("No id was given") unless params[:id]
# Render the result
respond_to do |format|
- format.rss { render :action => :list }
- format.xml { render :action => :list }
- format.json { render :action => :list }
- format.gpx { render :action => :list }
+ format.rss { render :action => :index }
+ format.xml { render :action => :index }
+ format.json { render :action => :index }
+ format.gpx { render :action => :index }
end
end