-
-
Notifications
You must be signed in to change notification settings - Fork 12
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
The use of classify is not documented which produces unexpected singularization of class names in organizers #167
Comments
This is possibly a bug, let me investigate this evening. |
@majksner can you add the contents of the interactors themselves? |
🤔 I've done a bit of testing and it appears to be an issue with the class name |
I've also noticed if the class is called While I'm here. I've noticed another possible issue. If some of the interactors of the organizer fail [10] pry(main)> stripe = StripeCustomer::UpdateCustomer.perform(user: user, params: params)
stripe.success?
=> false
[10] pry(main)> stripe.errors
=> #<ActiveModel::Errors:0x00007fa730422528
@base=
#<StripeCustomer::UpdateCustomer::Context user=#<User id: 104..>, params={...}>,
@details={},
@messages={}> Thank you for looking into this. |
This appears to be an issue with
|
I see it singularizes string. [2] pry(main)> "PrepareFiles".classify
=> "PrepareFile"
[3] pry(main)> "PrepareThings".classify
=> "PrepareThing"
[4] pry(main)> "Generates".classify
=> "Generate" Maybe I can send you a pull request for documentation to mention this? Aside from this, putting organizers into modules that I mentioned at the beginning of this issue is a way to go or you have a better suggestion? |
The issue isn't the nested modules, it's the class names themselves. |
@majksner could you file a separate bug for this? |
I've also added a new bug, #168, for this... for |
Instead of a documentation change we will use |
Question
If I want to have multiple organizers but I want them in separate modules, let's say I have an organizer in module Order (
app/interactors/order
)This kinda works, but for an unknown reason, some interactors are skipped and I'm not sure why (in my case
Order::PrepareData
)If I rename class to PrepareStuff it works fine.
P.S. I'm new to Ruby, so I might be doing something wrong.
The text was updated successfully, but these errors were encountered: