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

Thanks!

On Tue, Jun 21, 2011 at 3:53 PM, Tom Meinlschmidt <[email protected]>wrote:

> 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
>
> On Jun 21, 2011, at 20:41 , Fernando Aureliano wrote:
>
> > 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!
> >
> >
> > --
> > Fernando Aureliano
> >
> >
> > --
> > You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> > To post to this group, send email to [email protected].
> > To unsubscribe from this group, send email to
> [email protected].
> > For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
> --
>
> ===============================================================================
> Tomas Meinlschmidt, MS {MCT, MCP+I, MCSE, AER}, NetApp Filer/NetCache
>
> www.meinlschmidt.com  www.maxwellrender.cz  www.lightgems.cz
>
> ===============================================================================
>
> --
> You received this message because you are subscribed to the Google Groups
> "Ruby on Rails: Talk" group.
> To post to this group, send email to [email protected].
> To unsubscribe from this group, send email to
> [email protected].
> For more options, visit this group at
> http://groups.google.com/group/rubyonrails-talk?hl=en.
>
>

-- 
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/rubyonrails-talk?hl=en.

Reply via email to