cách sử dụng ransackable_scopes trong ROR
katarina
Đã trả lời thg 6 2, 3:07 SA
Thanks for sharing the complete code like this; it's clear the problem lies with search_params. Ransack often wraps values when passing them to the scope, so flag.blank? isn't running correctly. Try logging the parameters before permitting to see what the raw values are. I often debug this way, drifting through the drift boss while waiting for the logs to run and then reading the results. Finding bugs this way is faster than staring at the code.
0
Tổ chức
Chưa có tổ chức nào.