Sha256: f4b086a8a64624eb50f2e955f08c5efd485fd5302dbc1035587d8c4389c8151c
Contents?: true
Size: 636 Bytes
Versions: 4
Compression:
Stored size: 636 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 <%= item_path('url') %> 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
4 entries across 4 versions & 1 rubygems