On Sep 29, 10:43 am, adedip <[email protected]> wrote:
> On 29 Set, 11:38, Frederick Cheung <[email protected]> wrote:
>
> > On Sep 29, 10:18 am, adedip <[email protected]> wrote:
>
> > > ----
> > > using @articles = Article.find_all_by_id(@ids)
> > > It seems to work, I get results, but they're wrong! :S
>
> > That should work. Does the generated sql look right ?
>
> > Fred
>
> nope, it doesn't I get other authors and Dates out of the range
> the funny thing is that if I pass the array number manually it works!
> how can I print the @ids variable in the view? just to have a log..
>
You could use debug. What's wrong with the generated sql? Also, you
say you are intersecting the relevant finds but you seem to be just
concatenating them.
Lastly, given that you already have all the Article objects, why go
back to the database (ie why not @aut & @range & @search) ?
Fred
> (btw I've just realized that I can avoid the two Article.find arrays
> by extending conditions in only one of them :P)
>
>
>
>
>
> > > ----
>
> > > what's wrong? :S
> > > Thanks
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---