Sha256: ba99fba14b4188538b862b5201a44e54b9837a6d260e76f2e5081ab10aecdfb4

Contents?: true

Size: 462 Bytes

Versions: 18

Compression:

Stored size: 462 Bytes

Contents

# To test creating users without activation
class UsersController < ApplicationController

  def new
    @user = User.new
  end

  def create
    @user = User.new user_params
    if @user.save
      # NOTE to login the user here, do this:
      # login @user, true
      redirect_to articles_path
    else
      render :new
    end
  end

  private

  def user_params
    params.require(:user).permit(:name, :email, :password, :password_confirmation)
  end

end

Version data entries

18 entries across 18 versions & 1 rubygems

Version Path
quo_vadis-2.2.4 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.2.2 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.2.1 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.2.0 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.11 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.10 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.9 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.8 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.7 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.6 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.5 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.4 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.3 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.2 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.1 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.1.0 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.0.2 test/dummy/app/controllers/users_controller.rb
quo_vadis-2.0.1 test/dummy/app/controllers/users_controller.rb