kshitijLohbare

Joined

1,020 Experience
9 Lessons Completed
0 Questions Solved

Activity

Posted in Invite using phone number instead of email

I am using devise gem for authenticating users. I modified it a bit to let users signup using a mobile number instead of email id. Which now works as expected.
What I want to do next is inviting users in a project using the phone number. I saw the tutorial for inviting users using the devise_invitable gem. Should I try and modify the gem to use invite on the mobile number or build a custom method?
I am still a bit new to rails, if you can also point me to a resource to enable this use case, that would be really helpful.
Thanks :)

It worked!

Thanks a ton. Let me try and implement this.

Hey everyone, I was launching a multi-tenant app and want to know if there is a way through which we can disable a tenant if they cancel the subscription without deleting their data.
I can add this in the routes.rb file -

--
class SubdomainConstraint
def self.matches?(request)
subdomains = %w{ www admin homes }
request.subdomain.present? && !subdomains.include?(request.subdomain)
end
end
Rails.application.routes.draw do
constraints SubdomainConstraint do
resources :companies
end

But then is there another way to add more names in that constraint without having to deploy the code everytime.
Do you have suggestions?