Sha256: 2a99d0ede5247f4afad5da551a186b1694aeb1ccd657016b6c4cfef37efeae1d

Contents?: true

Size: 869 Bytes

Versions: 8

Compression:

Stored size: 869 Bytes

Contents

@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


Version data entries

8 entries across 8 versions & 1 rubygems

Version Path
ajax_scaffold_generator-3.0.0 templates/rjs_create.rjs
ajax_scaffold_generator-3.0.1 templates/rjs_create.rjs
ajax_scaffold_generator-3.0.2 templates/rjs_create.rjs
ajax_scaffold_generator-3.0.3 templates/rjs_create.rjs
ajax_scaffold_generator-3.0.4 templates/rjs_create.rjs
ajax_scaffold_generator-3.1.0 templates/rjs_create.rjs
ajax_scaffold_generator-3.1.1 templates/rjs_create.rjs
ajax_scaffold_generator-3.1.2 templates/rjs_create.rjs