-
-
Notifications
You must be signed in to change notification settings - Fork 828
Milestone
Description
Is this the intended behavior?
class Lesson < ApplicationRecord
enum :status, {
one: 1,
two: 2,
three: 3
}
class << self
def ransackable_attributes(auth_object = nil)
["status"]
end
end
endLesson.ransack({ "status_eq" => "two" }).result
# I expected: SELECT * FROM lessons WHERE status = 2But the actual query is:
SELECT "lessons".* FROM "lessons" WHERE "lessons"."status" = 0I understand that defining a ransacker in the model can be used as a workaround.
That said, if this is considered a bug, I would truly appreciate any fix or guidance.
If there's any way I could contribute to resolving it, I’d be more than happy to help.
I’m not very fluent in English, so I apologize if my words sounded rude
Reactions are currently unavailable