Find by parameter

Hi,

I’m trying to do a query on controller for get list by a boolean value

I do

@movies = Movie.where(:active => 1)

This value is already on form and it is being written on database, but when I write a block, I still picked up the list of all videos

Can anyone see what I’m doing wrong?

Thanks!

hi,

did you try Movie.where(:active => true) ? (if your column is boolean)

you can try in your console...

or could try Movie.where("active = 1")

tom

Yeah. Works with Movie.where(:active => true)

Thanks!