mirror of
https://github.com/TracksApp/tracks.git
synced 2025-12-17 15:50:13 +01:00
Changes you will need to make: * In your environment.rb, you will need to update references to a few files per environment.rb.tmpl * In your environment.rb, you will need to specify the local time zone of the computer that is running your Tracks install. Other notes on my changes: * Modified our code to take advantage of Rails 2.1's slick time zone support. * Upgraded will_paginate for compatibility * Hacked the Selenium on Rails plugin, which has not been updated in some time and does not support Rails 2.1 * Verified that all tests pass on my machine, including Selenium tests -- I'd like confirmation from others, too.
27 lines
No EOL
494 B
Ruby
27 lines
No EOL
494 B
Ruby
class Preference < ActiveRecord::Base
|
|
belongs_to :user
|
|
|
|
def self.due_styles
|
|
{ :due_in_n_days => 0, :due_on => 1}
|
|
end
|
|
|
|
def self.day_number_to_name_map
|
|
{ 0 => "Sunday",
|
|
1 => "Monday",
|
|
2 => "Tuesday",
|
|
3 => "Wednesday",
|
|
4 => "Thursday",
|
|
5 => "Friday",
|
|
6 => "Saturday"}
|
|
end
|
|
|
|
def hide_completed_actions?
|
|
return show_number_completed == 0
|
|
end
|
|
|
|
def parse_date(s)
|
|
return nil if s.blank?
|
|
Date.strptime(s, date_format)
|
|
end
|
|
|
|
end |