]> source.dussan.org Git - redmine.git/commitdiff
Rails 2.1.2 deprecations (#2332).
authorJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Dec 2008 15:36:59 +0000 (15:36 +0000)
committerJean-Philippe Lang <jp_lang@yahoo.fr>
Sun, 14 Dec 2008 15:36:59 +0000 (15:36 +0000)
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@2134 e93f8b46-1217-0410-a6f0-8f06a7374b81

app/models/user.rb
app/views/my/account.rhtml
vendor/plugins/actionwebservice/init.rb
vendor/plugins/classic_pagination/lib/pagination.rb
vendor/plugins/engines/lib/engines/rails_extensions/dependencies.rb

index ff46d97721bc836f4b448e95b17e6404d9b549b7..96923900e59160c69cd8aa49de8ba41a145fce15 100644 (file)
@@ -144,7 +144,7 @@ class User < ActiveRecord::Base
   end
   
   def time_zone
-    @time_zone ||= (self.pref.time_zone.blank? ? nil : TimeZone[self.pref.time_zone])
+    @time_zone ||= (self.pref.time_zone.blank? ? nil : ActiveSupport::TimeZone[self.pref.time_zone])
   end
   
   def wants_comments_in_reverse_order?
index 20210c99a12c42d398f8d5041ba1f75e689b641b..f4b726f964a5d4ce23af6acd9107e0ec9dd38aba 100644 (file)
@@ -38,7 +38,7 @@
 <div class="box tabular">
 <% fields_for :pref, @user.pref, :builder => TabularFormBuilder, :lang => current_language do |pref_fields| %>
 <p><%= pref_fields.check_box :hide_mail %></p>
-<p><%= pref_fields.select :time_zone, TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
+<p><%= pref_fields.select :time_zone, ActiveSupport::TimeZone.all.collect {|z| [ z.to_s, z.name ]}, :include_blank => true %></p>
 <p><%= pref_fields.select :comments_sorting, [[l(:label_chronological_order), 'asc'], [l(:label_reverse_chronological_order), 'desc']] %></p>
 <% end %>
 </div>
index ade118c0f33616aa11814a58cd8de8dbd6e28ec0..32d6ea11ae966af9d06d28a6110242de96f0c09f 100644 (file)
@@ -1,7 +1,7 @@
 require 'action_web_service'
 
 # These need to be in the load path for action_web_service to work
-Dependencies.load_paths += ["#{RAILS_ROOT}/app/apis"]
+ActiveSupport::Dependencies.load_paths += ["#{RAILS_ROOT}/app/apis"]
   
 # AWS Test helpers
 require 'action_web_service/test_invoke' if ENV['RAILS_ENV'] && ENV['RAILS_ENV'] =~ /^test/
index b6e9cf4bc5378d03a7bbf81fd6f8d264acefb681..6a3e1a97b0f661cb63937fc8bbcc6b0b6c533a38 100644 (file)
@@ -97,8 +97,8 @@ module ActionController
             "Unknown options: #{unknown_option_keys.join(', ')}" unless
               unknown_option_keys.empty?
 
-      options[:singular_name] ||= Inflector.singularize(collection_id.to_s)
-      options[:class_name]  ||= Inflector.camelize(options[:singular_name])
+      options[:singular_name] ||= ActiveSupport::Inflector.singularize(collection_id.to_s)
+      options[:class_name]  ||= ActiveSupport::Inflector.camelize(options[:singular_name])
     end
 
     # Returns a paginator and a collection of Active Record model instances
index 82ecaa880887af90c3e9b856c725dec1ae6ff13f..05ba0eb58c6b842923c354c63f3fce4642154574 100644 (file)
@@ -140,4 +140,4 @@ module Engines::RailsExtensions::Dependencies
   end  
 end
 
-Dependencies.send :include, Engines::RailsExtensions::Dependencies
+ActiveSupport::Dependencies.send :include, Engines::RailsExtensions::Dependencies