Sha256: 760e75e0e78cd53ff460947b0b60aad0e8b32c7f1dcac260729c376e2a34a70b
Contents?: true
Size: 694 Bytes
Versions: 3
Compression:
Stored size: 694 Bytes
Contents
def update @<%= singular_name %> = @<%= parent_singular_name %>.<%= plural_name %>.find(params[:id]) respond_to do |wants| if @<%= singular_name %>.update_attributes(params[:<%= singular_name %>]) wants.html do flash[:notice] = "Successfully updated <%= name.humanize.downcase %>." redirect_to <%= parent_singular_name %>_<%= plural_name %>_path(@<%= parent_singular_name %>) end <%- if options[:ajaxify] %> wants.js <%- end %> else wants.html { render :action => 'edit' } <%- if options[:ajaxify] %> wants.js { render :action => 'error' } <%- end %> end end end
Version data entries
3 entries across 3 versions & 1 rubygems