<%= select 'stuff', 'id', Stuff.find_by_sql( "SELECT stuffs.value,
stuffs.id from stuffs WHERE account_id = " + @account.id.to_s + " ORDER
BY stuffs.value ASC" ).collect{ |a| [a.value, a.id] }, {:include_blank
=> true, :selected => @user.stuff_profile.to_s } %>
I'm not sure what stuff_profile is, but the fact that you're
converting it, whatever it is, to a string means that it's guaranteed
not to be equal to any of those ids.
I'm not sure what stuff_profile is, but the fact that you're
converting it, whatever it is, to a string means that it's guaranteed
not to be equal to any of those ids.
Fred
I added that as a last ditch effort to try and make it work but with no
luck. even without it it still doesn't work.
I'm not sure what stuff_profile is, but the fact that you're
converting it, whatever it is, to a string means that it's guaranteed
not to be equal to any of those ids.
Fred
I added that as a last ditch effort to try and make it work but with
no
luck. even without it it still doesn't work.
what is stuff_profile ? what ever you pass to :selected should be an
integer that will be == to the id of one of the instances of Stuff you
are returning