hobo - Calculating Ratio in a Ruby Model -


Hi, I am doing a data entry system for a local NGO which conducts surveys about birds in the forests. I have four models, birds, places, reports and ratios. While Bird & amp; Places are just plain models, with only one name field, my report field is as follows.

  class Report & lt; ActiveRecord :: Base hobo_model # Do not put anything on top of the field Date: Date Plmge enum_string (: breeding, Garbreding) weather enum_string (: Clear, sunny ,: moist) time enum_string (: Morning, morning, afternoon, evening, night , Evening, night) ends the stamps: the birds agree: the end of the place   

In the ratio model I need to calculate a ratio for the following logic.

Given that a bird x is found in one place L, the ratio should be equal to par. Bird X is reported in L. Total of reported bird reports in L Number. How do I get data from database in ratio model?

I answered the question on Hobo, mailing list where you originally asked your question Posted:

Comments