Sha256: 9db0d3d1635fbd90090cf4cd665e83fdbf0883fec2925dca7eafb2f2682ef142

Contents?: true

Size: 281 Bytes

Versions: 4

Compression:

Stored size: 281 Bytes

Contents

  def create
    @<%= instance_name %> = <%= class_name %>.new(params[:<%= instance_name %>])
    if @<%= instance_name %>.save
      redirect_to <%= item_path :instance_variable => true %>, :notice => "Cadastrado com Sucesso!"
    else
      render :action => 'new'
    end
  end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
flockonus-nifty-generators-0.0.12 lib/generators/nifty/scaffold/templates/actions/create.rb
flockonus-nifty-generators-0.0.11 lib/generators/nifty/scaffold/templates/actions/create.rb
flockonus-nifty-generators-0.0.10 lib/generators/nifty/scaffold/templates/actions/create.rb
flockonus-nifty-generators-0.0.9 lib/generators/nifty/scaffold/templates/actions/create.rb