The following works for me:
Mymodel.find(:all, :conditions => "fieldOne = 'Example1' AND myobject_id
= '1'")but when I try
Mymodel.find(:all, :conditions => { :fieldOne => Example1, :myobject_id
=> 1 })
That's missing quotes around Example1. I suggest you cut and paste
your script/console session inputs and outputs exactly, so we can see
what's happening.
Using a hash works fine for me, so something else is going on here.
... I get an error message
ActiveRecord::StatementInvalid: Mysql::Error: Unknown column
'fieldOneExample1myobject_id1' in 'where clause': SELECT * FROM mymodels
WHERE (fieldOneExample1myobject_id1)
This looks like the hash is being converted to a string before it's
getting to AR, so we need to see *exactly* what you're doing.