suppose we got two models: category and article. category has_many articles, article belongs_to category
article has a named_scope defined by named_scope :online, :conditions => {:state => 2}
in the controller i want to search for online articles that belongs to a given category. i tried this query: @category.articles.online.find(params[:id)) it works, but it duplicates the condition about the category in the generated SQL: SELECT * FROM "articles" WHERE ("articles"."id" = 6 AND ("articles".category_id = 1)) AND (("articles"."state" = 2) AND ("articles".category_id = 1))
am i missing something?