mirror of
https://github.com/discourse/discourse.git
synced 2024-11-23 06:49:14 +08:00
e94707acdf
This patch removes the `with_service` helper from the code base. Instead, we can pass a block with actions directly to the `.call` method of a service. This simplifies how to use services: - use `.call` without a block to run the service and get its result object. - use `.call` with a block of actions to run the service and execute arbitrary code depending on the service outcome. It also means a service is now “self-contained” and can be used anywhere without having to include a helper or whatever. |
||
---|---|---|
.. | ||
application_helper.rb | ||
common_helper.rb | ||
email_helper.rb | ||
embed_helper.rb | ||
emoji_helper.rb | ||
list_helper.rb | ||
posts_helper.rb | ||
qunit_helper.rb | ||
splash_screen_helper.rb | ||
topic_post_bookmarkable_helper.rb | ||
topics_helper.rb | ||
user_notifications_helper.rb |