Tranquiliste wrote: > Hello > > You could use named_scope (starting with rails 2.1). > > There is a good rails cast presenting them with an example with > dates : http://railscasts.com/episodes/108-named-scope
Hi, thanks for the response. I am wondering how to do this in my app. I can see the example code named_scope :recent, lambda { |time| { :conditions => ["created_at > ?", time] } } and examples on the net state the same, but I want to be able to input two dates into boxes and call the filter from the view page, which I also am not sure how to do. any help would be greatly appreciated. dave -- Posted via http://www.ruby-forum.com/. --~--~---------~--~----~------------~-------~--~----~ 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 rubyonrails-talk@googlegroups.com To unsubscribe from this group, send email to rubyonrails-talk+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en -~----------~----~----~----~------~----~------~--~---