Joshua Mark

Joined

740 Experience
7 Lessons Completed
0 Questions Solved

Activity

Posted in Inviting Users with devise_invitable Discussion

Answering my own question here - the opts or args splat is not for random additional information in devise mail methods, it's specifically for headers. https://github.com/heartcombo/devise/blob/45b831c4ea5a35914037bd27fe88b76d7b3683a4/lib/devise/mailers/helpers.rb#L31

Setting up a custom invitation email with more information is how to do it. You can modify the invite! method by passing a block. For example:

user.invite! do |user|
  user.skip_invitation = true
  user.skip_confirmation!
end
# NOTE We must use deliver_now to not leak invitation token to Redis
CustomMailer.custom_mail_method(user, project_name).deliver_now

Posted in Inviting Users with devise_invitable Discussion

I'm wondering the same thing. There's a bunch of answers out there but none of them seem to leverage the built-in args* on invite!. I can see the options being passed into sidekiq but I'm not sure how to access them in the template.

Posted in Why Ember? Discussion

There's no turbolinks 4 :P

Posted in Admin Interfaces with Administrate Discussion

*shudder*.. "automagically"

logo Created with Sketch.

Ruby on Rails tutorials, guides, and screencasts for web developers learning Ruby, Rails, Javascript, Turbolinks, Stimulus.js, Vue.js, and more. Icons by Icons8

© 2021 GoRails, LLC. All rights reserved.