Changed save into update, following more RESTful methods.

This commit is contained in:
Paul van Tilburg 2011-11-07 11:12:12 +01:00
parent 41ba9ba162
commit adb1896506
1 changed files with 2 additions and 2 deletions

View File

@ -234,7 +234,7 @@ module StopTime::Controllers
@customer = Customer.find(customer_id) @customer = Customer.find(customer_id)
if @input.has_key? "delete" if @input.has_key? "delete"
@customer.delete @customer.delete
elsif @input.has_key? "save" elsif @input.has_key? "update"
attrs = ["name", "short_name", attrs = ["name", "short_name",
"address_street", "address_postal_code", "address_city", "address_street", "address_postal_code", "address_city",
"email", "phone", "hourly_rate"] "email", "phone", "hourly_rate"]
@ -506,7 +506,7 @@ module StopTime::Views
li { _form_input(@customer, "Phone number", "phone", :text) } li { _form_input(@customer, "Phone number", "phone", :text) }
li { _form_input(@customer, "Hourly rate", "hourly_rate", :text) } li { _form_input(@customer, "Hourly rate", "hourly_rate", :text) }
end end
input :type => "submit", :name => "save", :value => "Save" input :type => "submit", :name => "update", :value => "Update"
input :type => "submit", :name => "cancel", :value => "Cancel" input :type => "submit", :name => "cancel", :value => "Cancel"
end end
if @edit_task if @edit_task