Replies: 2 comments
-
If you require active_support's inflector (or any library adding the inflection methods to string), Sequel will use it, as you can see in your code example. You can also configure Sequel's inflector without using a string inflector library: Sequel::Inflections.uncountable "rfss" No further changes to the default inflections are planned. |
Beta Was this translation helpful? Give feedback.
0 replies
-
Problem remains as there is a totally different behavior between ''inflection"s: require 'sequel'
include Sequel::Inflections
singularize "rfss" => "rfs"
pluralize _ => "rfs"
Sequel::Inflections.uncountable "rfss"
singularize "rfss" => "rfss"
pluralize _ => "rfss"
require 'active_support/inflector'
singularize "rfss" => "rfss"
pluralize _ => "rfsses" Anyway, okay... I just need to ensure that I keep these non-standard schemas at the forefront of my mind and take care of them. |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Hi Jeremy,
#singularize
returns differently whenactive_support/inflector
is required:I see it should use pre-defined
#singularize
, when it responds:sequel/lib/sequel/model/inflections.rb
Line 136 in 6a7f915
It gets tricky with Associations.
I can override it in sequel or in 'active_support'.
My question is, is there any other solution?
Do you plan to harmonize the singularize(s)?
Is there a way to solely use sequel's solution bypassing any external support?
Cheers,
Paulo
Beta Was this translation helpful? Give feedback.
All reactions