devise-confirmable

How redirect 'Confirmation token invalid' on Devise

醉酒当歌 提交于 2019-12-11 02:34:34
问题 I configured my Rails application with devise :confirmable and after registration the user receives an email with the confirmation link. When the user click in this link a second time the token is invalid which is the expected behavior in my application. However, it sends the user to a page located at "app\views\devise\confirmations\new.html.erb" with an error 'Confirmation token is invalid' and what I want is to show that error(<%= devise_error_messages! %>), but in my Sign In Page.

Do custom action after devise model confirmation

倖福魔咒の 提交于 2019-12-11 02:34:33
问题 I know once the user has confirmed a Confirmable account in devise, I can change the redirect URL with: def after_confirmation_path_for(resource) view_context.admin_dashboard_url_for(subdomain: resource.tenant.subdomain) end But if I wanted to call a custom method on the resource after confirmation, how would I do that with devise? I suppose I could stick it in this method... def after_confirmation_path_for(resource) resource.do_thing_after_confirmation view_context.admin_dashboard_url_for

Add dynamic value in devise email subject

吃可爱长大的小学妹 提交于 2019-12-10 03:41:34
问题 Ok I have seen many discussions about customizing devise email subject but none seems to solve what I want. Currently my confirmation email subject reads " Confirm your Qitch.com account ". I want to customize this email subject and add a dynamic value of a user's name in it such that if user ALEX signs up for an account, he should get an email address with the subject, Welcome ALEX, confirm your Qitch.com account . How can I achieve this in devise? devise.en.yml mailer: confirmation

ActionController::UrlGenerationError in Devise::Registrations#create

泄露秘密 提交于 2019-12-08 11:37:21
问题 I'm newbie in Rails and I don't know what to do with tis error, please help (with explanation): ActionController::UrlGenerationError in Devise::Registrations#create Showing /home/ubuntu/workspace/mamchut418/app/views/devise/mailer/confirmation_instructions.html.erb where line #5 raised: No route matches {:action=>"create", :confirmation_token=>"24GGcednzrEXEzaR82AC", :controller=>"devise/confirmations"} missing required keys: [:locale] Extracted source (around line #5): 3 | <p><%= _('You can

Rails 3 Devise confirmation filter

不想你离开。 提交于 2019-12-08 02:42:27
I'm wondering if it's possible to selectively require confirmation for certain controller actions using Devise. Basically: I want users to sign up for an account (which will trigger a confirmation email), be automatically logged in, and be able to immediately explore certain parts of the site as a signed in (but still unconfirmed) user. Access to certain areas (e.g., payment) would require the user to first confirm their email . I'm hoping for something like before_filter: user_is_confirmed, only: [payment_related_stuff] I searched for a while and could not find a way to do this out of the box

Automatically set password for user - Devise

南笙酒味 提交于 2019-12-07 13:17:28
问题 Following this tutorial, I setup a simple registration system with devise, where a user enters their email address, they are sent a confirmation email, they click on it, it takes them to a form where they have to enter their password and complete the registration. How do I skip that password form so that once the user clicks on the confirmation link in their email, their account is created? How can I automatically set simple password for all users? 回答1: Create a method in your user model to

Devise - Different email when manually registered

左心房为你撑大大i 提交于 2019-12-06 15:48:54
问题 I want to give the administrator the ability to manually register new users. Everything goes fine by just creating a new user in the admin action but I want to send a different email to these users than the one being sent to those who registered following the normal procedure. Any ideas? 回答1: I think you can skip sending the original confirmation mail in your admin action. Simple create your own mailer action and send your desired mail. Maybe it is also possible to create a normal

Rails: Devise: Sending an email after user comfirms registration

北城以北 提交于 2019-12-06 04:56:37
问题 My application is using Devise, and is sending out confirmation emails properly, and confirming users properly as well after they click on the confirmation link. I would also like to send a second email AFTER the user is confirmed. There is a lot of advice on how to delay confirmation, or 2-step confirmation, but nothing on what I'm looking for (that I can find). The Devise::Module::Confirmable documentation tells me that the method to use is confirm!, but I am not sure how to do this. Any

Add dynamic value in devise email subject

痴心易碎 提交于 2019-12-05 05:06:54
Ok I have seen many discussions about customizing devise email subject but none seems to solve what I want. Currently my confirmation email subject reads " Confirm your Qitch.com account ". I want to customize this email subject and add a dynamic value of a user's name in it such that if user ALEX signs up for an account, he should get an email address with the subject, Welcome ALEX, confirm your Qitch.com account . How can I achieve this in devise? devise.en.yml mailer: confirmation_instructions: subject: 'Confirm your Qitch.com account' reset_password_instructions: subject: 'Reset your Qitch

Devise - Different email when manually registered

只愿长相守 提交于 2019-12-04 22:01:29
I want to give the administrator the ability to manually register new users. Everything goes fine by just creating a new user in the admin action but I want to send a different email to these users than the one being sent to those who registered following the normal procedure. Any ideas? I think you can skip sending the original confirmation mail in your admin action. Simple create your own mailer action and send your desired mail. Maybe it is also possible to create a normal confirmation mail, but modify the mail output. bundle exec rails generate devise:views And after that modify the text