Class: Muck::UsernameRequestController
- Inherits:
-
ApplicationController
- Object
- ApplicationController
- Muck::UsernameRequestController
- Defined in:
- app/controllers/muck/username_request_controller.rb
Instance Method Summary collapse
-
#create ⇒ Object
Forgot username action.
-
#new ⇒ Object
Enter email address to recover username.
Instance Method Details
#create ⇒ Object
Forgot username action
15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 |
# File 'app/controllers/muck/username_request_controller.rb', line 15 def create @title = t('muck.users.username_request') if @user = User.find_by_email(params[:request_username][:email]) @user.deliver_username_request! flash[:notice] = t('muck.users.username_sent') respond_to do |format| format.html { redirect_to login_path } end else flash[:notice] = t('muck.users.could_not_find_user_with_email') respond_to do |format| format.html { render :template => 'username_request/new' } end end end |
#new ⇒ Object
Enter email address to recover username
7 8 9 10 11 12 |
# File 'app/controllers/muck/username_request_controller.rb', line 7 def new @title = t('muck.users.username_request') respond_to do |format| format.html { render :template => 'username_request/new' } end end |