# GET /modes/1;edit
def edit
@services = Service.find(:all)
@service_ids = Service.find(:all).map{|s| [s.service_name, s.id]}
@mode.basic_rule ||= "default"
respond_to do |format|
format.html # edit.rhtml
format.js do
render :update do |page|
page.replace dom_id(@mode), :partial => 'modes/edit_mode'
end
end
end
end
Functional test - Commented out test_shouldnt_update test
# FIXME: get the two commented tests working or replace with manual tests
# test_new
test_create
test_show
test_edit
test_update :name => "Sum Mode"
test_destroy
# test_shouldnt_create :name => nil
# test_shouldnt_update :name => nil