Sha256: d51baef72a8eebb23cb12ce280004a2ff892a68063f20191e023c38796edd3c2

Contents?: true

Size: 665 Bytes

Versions: 16

Compression:

Stored size: 665 Bytes

Contents

class RegistrationsController < ApplicationController

  skip_authorization_check

  def new
    @user = User.new
  end

  def create
    @user = User.new(params[:user]) # TODO Safe attributes

    if @user.save
      redirect_to sign_in_path, notice: "Thanks for signing up. Please check your email for activation instructions."
    else
      render action: 'new'
    end
  end

  def activate
    if (@user = User.load_from_activation_token(params[:token]))
      @user.activate!
      auto_login @user
      redirect_to sign_in_path, notice: "Your account has been activated and you're now signed in. Enjoy!"
    else
      not_authenticated
    end
  end

end

Version data entries

16 entries across 16 versions & 1 rubygems

Version Path
raygun-0.0.34 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.34.pre2 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.33 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.32 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.31 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.30 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.29 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.28 rails_32/app/controllers/registrations_controller.rb
raygun-0.0.27 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.26 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.25 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.24 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.23 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.22 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.21 app_prototype/app/controllers/registrations_controller.rb
raygun-0.0.18 app_prototype/app/controllers/registrations_controller.rb