How to the get limit value when user passes Model.limit(10)


when the user calls Model.limit(10) I want is get the value of 10.

So for that, I have overloaded a function

def visit_Arel_Nodes_SelectStatement(o, collector)
    if o.limit
      limcoll =
      visit o.limit, limcoll
       puts "#{limcoll}"

This was working till rails 4 but it was not working in rails 6 (It prints ?)

I was trying to fix it for a long time but not succeeded
Can anyone please help me? what is the mistake I am doing?


This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs