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

Update promotion-actions.html.md #2781

Closed
wants to merge 1 commit into from
Closed

Update promotion-actions.html.md #2781

wants to merge 1 commit into from

Conversation

bazfer
Copy link
Contributor

@bazfer bazfer commented Jun 21, 2018

Action must be namespaced.

Action must be namespaced.
@@ -82,7 +82,7 @@ You must then register the custom action in an initializer in your
`config/initializers/` directory:

```ruby
Rails.application.config.spree.promotions.actions << MyPromotionAction
Rails.application.config.spree.promotions.actions << Spree::Promotion::Actions::MyPromotionAction
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't believe this is a pattern we wish to encourage. If this has resolution issues as it is I think that:

Rails.application.config.spree.promotions.actions << ::MyPromotionAction

or

Rails.application.config.spree.promotions.actions << MyNamespace::MyPromotionAction

would be preferrable.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What I suggested is what worked for me, but if either one of these two alternatives resolve as well and the pattern is preferred, sure, why not.

@jacobherrington
Copy link
Contributor

Hey @bazfer, are you planning on making this change?

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 this pull request may close these issues.

4 participants