Skip to content

Add configuration for custom person methods and use them. #2

New issue

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

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

Already on GitHub? # to your account

Merged
merged 2 commits into from
Nov 7, 2012

Conversation

trisweb
Copy link
Contributor

@trisweb trisweb commented Nov 7, 2012

The current implementation assumed a lot about the model, and in our case was unworkable since we already had a "current_user" helper. This adds configuration options to allow any user method, and furthermore any methods on that user model, to construct the person hash sent to Ratchet.

The current implementation assumed a lot about the model, and in our case was unworkable since we already had a "current_user" helper. This adds configuration options to allow any user method, and furthermore any methods on that user model, to construct the person hash sent to Ratchet.
Also fix exception that happened when user was nil after trying to find it.
@trisweb
Copy link
Contributor Author

trisweb commented Nov 7, 2012

Fixed some bugs and tested this out in our application—all is working well now! Thanks. We'll give this a shot.

brianr pushed a commit that referenced this pull request Nov 7, 2012
- default to `current_user` instead of `current_member`
- make the `id` method configurable as well
- rescue errors calling id/username/email on the returned person object
- update README and add sample code to initializer template
@brianr brianr merged commit 740215b into rollbar:master Nov 7, 2012
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants