Sha256: 5bdb82d2406517b67906140ef8d1a0da0387b21fe1c26dc7134de3c0b60a69f4

Contents?: true

Size: 327 Bytes

Versions: 5

Compression:

Stored size: 327 Bytes

Contents

  def update
    @<%= instance_name %> = <%= class_name %>.find(params[:id])
    if @<%= instance_name %>.update_attributes(params[:<%= instance_name %>])
      redirect_to <%= item_url %>, :notice  => "Successfully updated <%= class_name.underscore.humanize.downcase %>."
    else
      render :action => 'edit'
    end
  end

Version data entries

5 entries across 5 versions & 2 rubygems

Version Path
nifty-generators-0.4.6 lib/generators/nifty/scaffold/templates/actions/update.rb
nifty-generators-0.4.5 lib/generators/nifty/scaffold/templates/actions/update.rb
flockonus-nifty-generators-0.0.8 lib/generators/nifty/scaffold/templates/actions/update.rb
flockonus-nifty-generators-0.0.7 lib/generators/nifty/scaffold/templates/actions/update.rb
flockonus-nifty-generators-0.0.6 lib/generators/nifty/scaffold/templates/actions/update.rb