Display all records with an id smaller than 100 fails due to 'comparison of Symbol with 100 failed' <p>I have a user model and I need to display all users that have an id of smaller than 100. My code is</p> <pre><code>User.where(:id &lt; 100) </code></pre> <p>The error message is "comparison of Symbol with 100 failed". How can I just get all users with ids smaller than 100? How will it be if I need ids between 100 and 200?</p>