-
Notifications
You must be signed in to change notification settings - Fork 46
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
[Feat] Rails integration to set default inflector #298
Conversation
0e49481
to
933eaeb
Compare
Codecov Report
@@ Coverage Diff @@
## main #298 +/- ##
==========================================
- Coverage 99.18% 99.13% -0.06%
==========================================
Files 12 13 +1
Lines 489 576 +87
==========================================
+ Hits 485 571 +86
- Misses 4 5 +1
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
This seems fine to me as an alternative to #274. You could consider If you want help testing, let me know. I have a few sample Rails and Hanami apps I was using to test this earlier as well. |
933eaeb
to
ffcb114
Compare
This is an implementation of how to automatically set default inflector with Rails. I haven't tested with user-defined inflector setting.
ffcb114
to
d5e1e85
Compare
@trevorturk I think this works OK, could you try it in real Rails apps? If this works I'll add Hanami integration in separate PR. |
Yes, this works perfectly for me. It's set by default, and if you want to configure
|
@trevorturk Could you also check if it works with user-defined initializer? For example, # config/initializers/alba.rb
Alba.inflector = :dry |
Yes, sorry if I wasn't clear about it, but I did test that. (See my code sample above, I should have broken it into two examples, but I did try with and without an initializer. It works great in both cases.) |
Awesome, thank you! |
🥳 |
This is a temporary implementation of how to automatically set default inflector with Rails.
I haven't tested with user-defined inflector setting.