Class: UserTemplates::LoginController
- Inherits:
-
Volt::ModelController
- Object
- Volt::ModelController
- UserTemplates::LoginController
- Defined in:
- app/user_templates/controllers/login_controller.rb
Instance Method Summary collapse
Instance Method Details
#do_login ⇒ Object
7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 |
# File 'app/user_templates/controllers/login_controller.rb', line 7 def do_login Volt.login(login, password).then do # Successful login, clear out the form self.errors = nil self.login = '' self.password = '' go(attrs.post_login_url.or('/')) nil end.fail do |errors| # Login fail self.errors = errors end end |
#use_username? ⇒ Boolean
23 24 25 |
# File 'app/user_templates/controllers/login_controller.rb', line 23 def use_username? Volt.config.public.try(:auth).try(:use_username) end |