Class: Subscribem::Account::UsersController

Inherits:
Subscribem::ApplicationController show all
Defined in:
app/controllers/subscribem/account/users_controller.rb

Instance Method Summary collapse

Methods inherited from Subscribem::ApplicationController

#authenticate_user!, #current_account, #current_user, #force_authentication!, #user_signed_in?

Instance Method Details

#createObject



9
10
11
12
13
14
15
# File 'app/controllers/subscribem/account/users_controller.rb', line 9

def create
   = Subscribem::Account.find_by!(:subdomain => request.subdomain)
  user = .users.create(user_params)
  force_authentication!(, user)
  flash[:success] = "You have signed up successfully."
  redirect_to root_path
end

#newObject



5
6
7
# File 'app/controllers/subscribem/account/users_controller.rb', line 5

def new
  @user = Subscribem::User.new
end