if you have a collection_select from which you, using DOM, add its
values to an UL or some HTML structure, upon reload of the page the
collection_select will repopulate with all the values from the DB,
including the ones you’ve selected previously. is there a quick/easy
way to tell activerecord to select all values not in a given set?
models = find( :all, :conditions => ‘id_field_from_table NOT IN (’ +
banned_id_array.join( ', ’ ) + ‘)’ )
Binh Ly wrote:
hello all,
if you have a collection_select from which you, using DOM, add its
values to an UL or some HTML structure, upon reload of the page the
collection_select will repopulate with all the values from the DB,
including the ones you’ve selected previously. is there a quick/easy
way to tell activerecord to select all values not in a given set?