> > 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
im pretty sure this would work. But am wondering how I can call this filter from my page. so for example have two text boxes and a button that calls somthing similar to " @article.comments.in_period(@start_date, @end_date)" named_scope :in_period, lambda { |start_date, end_date| { :conditions => ["articles.created_at >= ? and " + "articles.created_at <= ?", start_date, end_date] } any ideas? -- 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 -~----------~----~----~----~------~----~------~--~---