Displaying 1 result from an estimated 1 matches for "compiled_on_week".
2009 Jul 02
7
Params Merge and URL sorting/pagination
...of_week
# we need to reconvert the time back to a readable week start date
week_start_date = convert_time.to_date.strftime(''%Y-%m-%d'')
# using our named scope to checked for compiled_on which is a date
type column to search within specified date ranges
named_scope :compiled_on_week, lambda { { :conditions =>
[''compiled_on >= ? and compiled_on <= ?'', week_start_date, datevar] } }
# automatically ordering by rank if our orderby is nil or empty
orderby = "rank" if orderby.nil? || orderby.empty?
# deciding whether to sort by ascend...