Sha256: d031447eddc82f81b804aec9c8ec512fa20067aa8f27a154cbce2729c3037956

Contents?: true

Size: 587 Bytes

Versions: 21

Compression:

Stored size: 587 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
    <%- unless options[:authlogic] -%>
      session[:<%= user_singular_name %>_id] = @<%= user_singular_name %>.id
    <%- end -%>
      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

21 entries across 21 versions & 10 rubygems

Version Path
corntrace-nifty-generators-0.4.1 rails_generators/nifty_authentication/templates/users_controller.rb
corntrace-nifty-generators-0.4.0 rails_generators/nifty_authentication/templates/users_controller.rb
nifty-generators-0.4.0 rails_generators/nifty_authentication/templates/users_controller.rb
splendeo-generators-0.2.0 rails_generators/splendeo_authentication/templates/users_controller.rb
splendeo-generators-0.1.3 rails_generators/splendeo_authentication/templates/users_controller.rb
splendeo-generators-0.1.2 rails_generators/splendeo_authentication/templates/users_controller.rb
splendeo-generators-0.1.1 rails_generators/splendeo_authentication/templates/users_controller.rb
splendeo-generators-0.1.0 rails_generators/splendeo_authentication/templates/users_controller.rb
splendeo-nifty-generators-0.3.2 rails_generators/nifty_authentication/templates/users_controller.rb
nifty-generators-0.3.2 rails_generators/nifty_authentication/templates/users_controller.rb
very_nifty_generators-0.2.1 lib/generators/nifty/authentication/templates/users_controller.rb
very_nifty_generators-0.2.0 lib/generators/nifty/authentication/templates/users_controller.rb
very_nifty_generators-0.1.2 lib/generators/nifty/authentication/templates/users_controller.rb
very_nifty_generators-0.1.1 lib/generators/nifty/authentication/templates/users_controller.rb
very_nifty_generators-0.1.0 lib/generators/nifty/authentication/templates/users_controller.rb
linki-nifty-generators-0.3.1 rails_generators/nifty_authentication/templates/users_controller.rb
linki-nifty_generators-0.3.1 rails_generators/nifty_authentication/templates/users_controller.rb
minerva-nifty-generators-0.3.0 rails_generators/nifty_authentication/templates/users_controller.rb
xenda-nifty-generators-0.3.2 rails_generators/nifty_authentication/templates/users_controller.rb
ghart-nifty-generators-0.3.0.1 rails_generators/nifty_authentication/templates/users_controller.rb