Hi

I have a model Topic that has many Posts, and I'm trying to use a
named scope on my find

I can do something like this:

@posts = @topic.posts.named_scope_func

But I cannot do this:

@posts = Post.find_by_topic_id(1).named_scope_func

The reason is that the "posts" and "find_by_topic_id" seem to return
different classes (Post and Array)

Am I doing something wrong?

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
-~----------~----~----~----~------~----~------~--~---

Reply via email to