Sha256: 7564ff0556b5a157f412bec4e21437aa6cfce7a6affcbe69655c0eb8217068c1

Contents?: true

Size: 280 Bytes

Versions: 21

Compression:

Stored size: 280 Bytes

Contents

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

Version data entries

21 entries across 21 versions & 2 rubygems

Version Path
thesilverspoon-0.0.22 lib/templates/actions/create.rb
thesilverspoon-0.0.21 lib/templates/actions/create.rb
thesilverspoon-0.0.20 lib/templates/actions/create.rb
thesilverspoon-0.0.19 lib/templates/actions/create.rb
thesilverspoon-0.0.18 lib/templates/actions/create.rb
thesilverspoon-0.0.17 lib/templates/actions/create.rb
thesilverspoon-0.0.16 lib/templates/actions/create.rb
thesilverspoon-0.0.15 lib/templates/actions/create.rb
thesilverspoon-0.0.14 lib/templates/actions/create.rb
thesilverspoon-0.0.13 lib/templates/actions/create.rb
thesilverspoon-0.0.12 lib/templates/actions/create.rb
thesilverspoon-0.0.11 lib/templates/actions/create.rb
thesilverspoon-0.0.10 lib/templates/actions/create.rb
thesilverspoon-0.0.9 lib/templates/actions/create.rb
thesilverspoon-0.0.8 lib/templates/actions/create.rb
thesilverspoon-0.0.7 lib/templates/actions/create.rb
thesilverspoon-0.0.6 lib/templates/actions/create.rb
thesilverspoon-0.0.5 lib/templates/actions/create.rb
thesilverspoon-0.0.4 lib/templates/actions/create.rb
thesilverspoon-0.0.3 lib/templates/actions/create.rb