simple find works in console but not in controller

I'm still new to rails and trying to figure out why this isn't
working. I've got a model named Buzzuser. It's got an a boolean
column/attribute named npc. At first I tried

Buzzuser.find(:all, :conditions => ["npc = ?", true])

and got no results in the controller, but the same query executing in
the console returned the correct row. Then I tried a simple

Buzzuser.find(:all)

with the same result: no results in controller, but correct in
console.

What am I missing?

I'm still new to rails and trying to figure out why this isn't
working. I've got a model named Buzzuser. It's got an a boolean
column/attribute named npc. At first I tried

Buzzuser.find(:all, :conditions => ["npc = ?", true])

and got no results in the controller, but the same query executing in
the console returned the correct row. Then I tried a simple

Buzzuser.find(:all)

with the same result: no results in controller, but correct in
console.

I expect they;re not running the same rails environment (check what it
says when you run script/server and script/console)

Fred

I thought that too, but they're both running in development
environment.

How does the SQL output look in development.log
when you run in console and controller?

Brian wrote:

I thought that too, but they're both running in development
environment.

What do your unit tests reveal?

I don't know how to view the SQL in the console, but in the dev log
it's what I would expect:

SELECT * FROM `buzzusers`

for the Buzzuser.find(:all), and

SELECT * FROM `buzzusers` WHERE (npc = 1)

for

Buzzuser.find(:all, :conditions => ["npc = ?", true])

Nothing. The unit test that runs this same find also successfully
finds the 2 that were loaded via the fixture.

more strangeness : if I use the default scaffold views, I can see the
buzzusers I'm looking for, and the npc = true values. But the find in
the controller still doesn't find them. Also, my current user (the
standard restful_authentication user guy) has a :has_one relationship
to a buzzuser, and that current buzzuser is being found just fine.

Is there any way to get more information on what's going on during the
find operation? Could it be swallowing an error? Can I turn up the
logging on it?