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

Ability to configure post-action hooks for select controllers #65

Open
jayroh opened this issue Jan 27, 2015 · 1 comment
Open

Ability to configure post-action hooks for select controllers #65

jayroh opened this issue Jan 27, 2015 · 1 comment
Assignees
Milestone

Comments

@jayroh
Copy link
Member

jayroh commented Jan 27, 2015

I'd love to be able to easily perform some commands after certain actions in the engine. For example:

  1. Notify a slack channel when something in particular happens.
  2. Track events to keen.io or mixpanel for purposes of analytics or data collection.
  3. Send emails

... and I would not like to add those sorts of things into the engine proper. Monkey-patching seems a bit brittle and unadvisable, and filters require a little too much knowledge of the object graph. A contract stating that X objects or lambda's will be called per action, with Y objects, feels sufficient. Riffing:

Thredded.posts_create_hooks += [NotifySlackChannel]
Thredded.topics_create_hooks += [->(topic){ do_something(topic); }]
@jayroh jayroh added the v0.4.0 label Jan 27, 2015
@jayroh jayroh removed the v0.4.0 label Apr 2, 2016
@jayroh
Copy link
Member Author

jayroh commented Apr 8, 2016

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant