So something like this, perhaps:

  class Post < ActiveRecord::Base
    named_scope :current_as_of, lambda { |time|
      { :conditions => ['do_not_show_before < ?', time] }
    }

    def self.current(time = Time.now)
      self.current_as_of(time)
    end
  end

I'm also concerned about chaining, and in particular about the
behavior of things like will_paginate. Hmmm.

Thanks,

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