Add LocationsNew controller

This commit is contained in:
Bram Senders 2011-11-23 16:00:44 +01:00
parent 803a8894dc
commit 2926b30969
1 changed files with 19 additions and 0 deletions

View File

@ -1040,6 +1040,25 @@ module StopTime::Controllers
end
end
# == The location creation controller
#
# Controller for filling in the information to create a new location.
#
# path:: /locations/new
# view:: Views#location_form
class LocationsNew
# Generates the form to create a new location object
# (Models::Location) using Views#location_form.
def get
@location = Location.new
@input = @location.attributes
@target = [Locations]
@button = "create"
render :location_form
end
end
# == The static data controller
#
# Controller for serving static data information available in the