search for: offense_level

Displaying 2 results from an estimated 2 matches for "offense_level".

2006 Jul 17
0
collection_select help
I can''t figure out how to get the collection_select to correctly identify and select the appropriate option in the drop down to begin with. i have checked that charge.offense_level contains the correct value to begin with (a number between 1 and 10) but the view still defaults to the first option and not the one contained in the charge.offense_level. what am i doing wrong? any suggestions? I have also tried: <%= collection_select "charge", "offense_level...
2006 Jul 14
3
compare two tables and find the difference?
...t but do have one field in common that i am comparing. The tables are not related in anyway. right now I have a find_by_sql query located in a model that looks like this: def self.absent_charges find_by_sql <<-QUERY SELECT sources.charge_id_number, sources.charge_name, sources.offense_level FROM sources LEFT JOIN charges ON sources.charge_id_number = charges.charge_id_number WHERE charges.id IS NULL QUERY end I also need to dedupe what ends up in my final collection after the find_by_sql query, but I am not sure how to go about this. Is there a bett...