named-scopes

What's best here, Rails Association Scopes or Just SQL?

I'm not quite sure what to do here, here's the situation: Given these models... class Post < ActiveRecord::Base has_many :post_assets has_many :assets, :through => :post_assets acts_as_scopeable :assets, :scopes => [:featured] end class PostAssets < ActiveRecord::Base belongs_to :post belongs_to :asset # context is so we...

How do I force searchlogic to perform OUTER JOINs on web forms searches?

Scenario: :author has_many :posts My searchlogic-based web form search for authors: f.text_field :name_like # author name f.text_field :posts_title_like # post title searchlogic named scopes use inner joins, so I'll only get authors returned if they have posts. Authors without posts are not returned. How do I force an outer join w...