anonymous-scope

Can I create an *un*named scope in Rails?

I know you can create named scopes in Rails, which allow you to specify conditions which can then be built on later: named_scope :active, :conditions => {:active => true} ... MyModel.active.find(...) This works by creating a proxy object which isn't evaluated until later on. What I want to know is if it's possible to create a dynami...

warning when using a named_scope as part of an anonymous scope

I have the following named scope: named_scope :find_all_that_match_tag, lambda { |tags| { :select => "articles.id, tags.name", :joins => :tags, :conditions => ["tags.name IN (?)",tags]} } It works fine like this in script/console Article.find_all_that_match_tag(["cooking"]) But if i use...