Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Support alignment in config file #287

Open
hcopperm opened this issue Apr 4, 2018 · 0 comments · May be fixed by #348
Open

Support alignment in config file #287

hcopperm opened this issue Apr 4, 2018 · 0 comments · May be fixed by #348

Comments

@hcopperm
Copy link

hcopperm commented Apr 4, 2018

Version info

  • intercom-rails version: latest
  • Rails version: 4.2.10

Expected behavior

Passing in config.alignment in the config file should change the alignment of the widget.

Actual behavior

The Rails app won't start, because 'alignment' is not a supported config option.

Steps to reproduce

  1. Add config.alignment = 'left' to your intercom-rails config file
  2. Start app

Logs

/Users/amitree/workspace/amitree/config/initializers/intercom_rails.rb:8:in `block in <top (required)>': undefined
method `alignment=' for IntercomRails::Config:Class (NoMethodError)

Notes

You can get around this error by putting alignment in config.user.custom_data

  config.user.custom_data = {
    'alignment' => Proc.new { |_current_user| 'left' },
  ...
  }

This is undocumented and not obvious, and also it is unclear if it will have unknown side effects.

@keloe keloe added invalid and removed invalid labels Jul 5, 2018
@emilkarl emilkarl linked a pull request Dec 6, 2023 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants