I am using Ruby on Rails v3.2.2 and I would like to check if a query is limited. That is:
Article.where(...).limit(10) # This is a limited query
Article.where(...) # This is not a limited query
Is there a way to check if the limit is set?
Note: I would like to check the limit in order to dynamically set it for a query if that is not set yet.
You can check the Arel object’s
limit.