-1

I have a condition where my rails app can be requested from different domains. Suppose it can be accessed via domain www.abc.com and www.xyz.com

Now my requirement is that, I need to have devise module include when application is accessed via domain www.abc.com.

And for domain www.xyz.com devise module should be excluded.

Hope somebody can let me know the way to achieve this, Thanks!

MayankS
  • 446
  • 1
  • 3
  • 17

1 Answers1

0

You can use the guest login for www.xyz.com and normal login for www.abc.com.

You can override method authenticate_user! put a condition for domain check.

Also, some other methods current_user will work for User with type guest.

For guest user functionality please refer: http://railscasts.com/episodes/393-guest-user-record

abhsss96
  • 353
  • 2
  • 11