Ask A Question

Notifications

You’re not receiving notifications from this thread.

Advanced search feature in ruby on rails?

ratnarajsukale asked in Rails

I have a "score" attribute in my "sheet" model which updates daily . and I need to calculate the "average_score(n)" . and add a search feature where the "user" can search for sheets where "average_score" for the last "n" number of days is "greater than" or "less than" or "equal to" 50 or some other number. how can I implement this feature?

Example - find the Sheets where average score for last 3 days [average_score(3)] is > 10

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 87,563+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.