Closed dux closed 3 days ago
status
is singular (statuses
is the plural form), and you should not be trying to singularize already singular names (singularization is not designed or expected to be idempotent).
You already showed the command to work around your issue (Sequel.inflections { _1.singular /status$/, "status" }
).
Note that there are likely many actual cases where singularization of the plural form is not correct, due to irregularities in the English language. However, the current inflection rules are basically finalized. Users who need changes to them should configure the changes.
Complete Description of Issue
I cant make "status".singularize to return "status" and not "statu"
Problem is that it should stay the same, but built in rule found in
Sequel.inflections.singulars
,[/s$/i, ""]
removes "s" and returns positive match herehttps://github.com/jeremyevans/sequel/blob/master/lib/sequel/model/inflections.rb#L138
How to fix this? And suggestion to add built in rule for
status
.Simplest Possible Self-Contained Example Showing the Bug
"statu", not "status"
Full Backtrace of Exception (if any)
No response
SQL Log (if any)
No response
Ruby Version
3.2.2
Sequel Version
5.85