Sha256: 802c48fc077506138b9cdea9880fab6e9a725ac4d26f5e2741848f031246ea51

Contents?: true

Size: 298 Bytes

Versions: 2

Compression:

Stored size: 298 Bytes

Contents

  def create
    @<%= instance_name %> = <%= class_name %>.new(params[:<%= instance_name %>])
    if @<%= instance_name %>.save
      redirect_to <%= item_url %>, :notice => "Successfully created <%= class_name.underscore.humanize.downcase %>."
    else
      render :action => 'new'
    end
  end

Version data entries

2 entries across 2 versions & 1 rubygems

Version Path
nifty-generators-0.4.6 lib/generators/nifty/scaffold/templates/actions/create.rb
nifty-generators-0.4.5 lib/generators/nifty/scaffold/templates/actions/create.rb