Sha256: 44cd6225dbf9c9714f3060a97249726783b8d7a99f51a6375fa4c96efc029460

Contents?: true

Size: 532 Bytes

Versions: 31

Compression:

Stored size: 532 Bytes

Contents

class <%= user_plural_class_name %>Controller < ApplicationController
  def new
    @<%= user_singular_name %> = <%= user_class_name %>.new
  end
  
  def create
    @<%= user_singular_name %> = <%= user_class_name %>.new(params[:<%= user_singular_name %>])
    if @<%= user_singular_name %>.save
      session[:<%= user_singular_name %>_id] = @<%= user_singular_name %>.id
      flash[:notice] = "Thank you for signing up! You are now logged in."
      redirect_to root_url
    else
      render :action => 'new'
    end
  end
end

Version data entries

31 entries across 31 versions & 8 rubygems

Version Path
PeterCoulton-rotten-generators-0.7.0 rails_generators/rotten_authentication/templates/users_controller.rb
PeterCoulton-rotten-generators-0.7.12 rails_generators/rotten_authentication/templates/users_controller.rb
intinno-nifty-generators-0.2.5 rails_generators/nifty_authentication/templates/users_controller.rb
polly-nifty-generators-0.2.3 rails_generators/nifty_authentication/templates/users_controller.rb
rotten-generators-0.9.0 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.2 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.3 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.4 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.5 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.6 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-generators-0.9.7 rails_generators/rotten_authentication/templates/users_controller.rb
rotten-rotten-generators-0.7.12 rails_generators/rotten_authentication/templates/users_controller.rb
rubycs-nifty-generators-compass-0.0.1 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.2.5 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.2.6 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.2.7 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.2.8 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.2.9 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.3.0 rails_generators/nifty_authentication/templates/users_controller.rb
twilson63-nifty-generators-0.3.1 rails_generators/nifty_authentication/templates/users_controller.rb