Open
Description
Hi guys, thank you for building the great app. I got the problem with intercom when I am using engine app.
Version info
- intercom-rails version: 0.3.5
- Rails version: 5.1.4
Expected behavior
- Intercom should load the correct user inside engine app and root app.
Actual behavior
- Intercom got the latest user signed in on 2 apps. ( 2 sessions (one for root app, one for engine app) are in the same browser).
Steps to reproduce
- Root app is using Intercom ( added config
intercom.rb
file)
config.user.custom_data = {
:company_admin => Proc.new { |user| user.company_admin? },
}
- Add new engine app inside named "ABC"
- I create new config file
intercom.rb
inroot_app/engines/config/initializers/intercom.rb
and update
config.user.current = Proc.new { current_abc_user } #current_abc_user model class is ABC::User
config.user.custom_data = {
:admin => Proc.new { |user| user.admin? },
}
- The engine app raise error with
user.company_admin?
(because that user object model hasn't defined the methodcompany_admin?
)
Thank you. 🙇
Metadata
Metadata
Assignees
Labels
No labels