@options = { :scaffold_id => params[:scaffold_id], :action => "view", :id => @<%= singular_name %>.id } @create_options = @options.merge(:action => "create", :id => params[:id]) if @successful page.insert_html :bottom, scaffold_tbody_id(@options), :partial => '<%= singular_name %>', :locals => { :hidden => true } page << "new TableRow.MoveAfter('#{element_row_id(@create_options)}', '#{element_row_id(@options)}');" page.remove element_row_id(@create_options) page.show element_row_id(@options) page << "AjaxScaffold.stripe('#{scaffold_tbody_id(@options)}');" page << "AjaxScaffold.removeSortClasses('#{@options[:scaffold_id]}');" page.replace_html scaffold_messages_id(@options), :partial => 'messages' else page.replace_html element_messages_id(@create_options), :partial => 'form_messages' page.hide loading_indicator_id(@create_options) end