mirror of
https://github.com/TracksApp/tracks.git
synced 2026-02-15 03:38:08 +01:00
Upgraded to Rails 2.1. This can have wide ranging consequences, so please help track down any issues introduced by the upgrade. Requires environment.rb modifications.
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.
This commit is contained in:
parent
f3bae73868
commit
901a58f8a3
1086 changed files with 51452 additions and 19526 deletions
|
|
@ -2,7 +2,7 @@
|
|||
# Likewise will all the methods added be available for all controllers.
|
||||
|
||||
require_dependency "login_system"
|
||||
require_dependency "source_view"
|
||||
require_dependency "tracks/source_view"
|
||||
require "redcloth"
|
||||
|
||||
require 'date'
|
||||
|
|
@ -20,6 +20,7 @@ class ApplicationController < ActionController::Base
|
|||
layout proc{ |controller| controller.mobile? ? "mobile" : "standard" }
|
||||
|
||||
before_filter :set_session_expiration
|
||||
before_filter :set_time_zone
|
||||
prepend_before_filter :login_required
|
||||
prepend_before_filter :enable_mobile_content_negotiation
|
||||
after_filter :restore_content_type_for_mobile
|
||||
|
|
@ -178,6 +179,14 @@ class ApplicationController < ActionController::Base
|
|||
raise ArgumentError.new("invalid value for Boolean: \"#{s}\"")
|
||||
end
|
||||
|
||||
def self.openid_enabled?
|
||||
Tracks::Config.openid_enabled?
|
||||
end
|
||||
|
||||
def openid_enabled?
|
||||
self.class.openid_enabled?
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def parse_date_per_user_prefs( s )
|
||||
|
|
@ -213,4 +222,8 @@ class ApplicationController < ActionController::Base
|
|||
logger.error("ERROR: #{message}") if type == :error
|
||||
end
|
||||
|
||||
def set_time_zone
|
||||
Time.zone = current_user.prefs.time_zone if logged_in?
|
||||
end
|
||||
|
||||
end
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue