Sha256: f0b4a4bbdfb102a4bf642b0ac8a015f83abe3b8b0236eb28c371d7064f6c0ce2

Contents?: true

Size: 938 Bytes

Versions: 9

Compression:

Stored size: 938 Bytes

Contents

@options = { :scaffold_id => params[:scaffold_id], :action => "view", :id => params[:id] }
@update_options = @options.merge(:action => "update")

if @successful
  page.remove element_row_id(@options)
  page.insert_html :bottom, scaffold_tbody_id(@options), :partial => '<%= singular_name %>', :locals => { :hidden => true }
  page << "new TableRow.MoveAfter('#{element_row_id(@update_options)}', '#{element_row_id(@options)}');"
  page.remove element_row_id(@update_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(@update_options), :partial => 'form_messages'
  page << "Form.enable('#{element_form_id(@update_options)}');"
  page.hide loading_indicator_id(@update_options)
end

Version data entries

9 entries across 9 versions & 1 rubygems

Version Path
ajax_scaffold_generator-3.1.3 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.4 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.5 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.6 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.7 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.8 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.9 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.10 templates/rjs_update.rjs
ajax_scaffold_generator-3.1.11 templates/rjs_update.rjs