aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller
diff options
context:
space:
mode:
authorDavid Heinemeier Hansson <david@loudthinking.com>2006-09-03 23:22:24 +0000
committerDavid Heinemeier Hansson <david@loudthinking.com>2006-09-03 23:22:24 +0000
commit6d88a992b5e92c09527c7915a7e2c8da09acb95e (patch)
tree5dcb469f1c78ca87823e46e3cd88ead39285df02 /actionpack/lib/action_controller
parent5b6fb1356c672dc0cae157072d1340bb98f5b9f1 (diff)
downloadrails-6d88a992b5e92c09527c7915a7e2c8da09acb95e.tar.gz
rails-6d88a992b5e92c09527c7915a7e2c8da09acb95e.tar.bz2
rails-6d88a992b5e92c09527c7915a7e2c8da09acb95e.zip
Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH]
git-svn-id: http://svn-commit.rubyonrails.org/rails/trunk@4952 5ecf4fe2-1ee6-0310-87b1-e25e094e27de
Diffstat (limited to 'actionpack/lib/action_controller')
-rwxr-xr-xactionpack/lib/action_controller/base.rb4
-rw-r--r--actionpack/lib/action_controller/flash.rb11
-rw-r--r--actionpack/lib/action_controller/helpers.rb1
-rw-r--r--actionpack/lib/action_controller/integration.rb1
-rw-r--r--actionpack/lib/action_controller/macros/auto_complete.rb2
-rw-r--r--actionpack/lib/action_controller/macros/in_place_editing.rb2
6 files changed, 12 insertions, 9 deletions
diff --git a/actionpack/lib/action_controller/base.rb b/actionpack/lib/action_controller/base.rb
index 7ab7845eea..ad165d5eb5 100755
--- a/actionpack/lib/action_controller/base.rb
+++ b/actionpack/lib/action_controller/base.rb
@@ -490,7 +490,7 @@ module ActionController #:nodoc:
when Symbol
ActiveSupport::Deprecation.warn(
- "WARNING: You called url_for(:#{options}), which is a deprecated API call. Instead you should use the named " +
+ "You called url_for(:#{options}), which is a deprecated API call. Instead you should use the named " +
"route directly, like #{options}(). Using symbols and parameters with url_for will be removed from Rails 2.0."
)
@@ -680,7 +680,7 @@ module ActionController #:nodoc:
options = { :update => true }
else
ActiveSupport::Deprecation.warn(
- "WARNING: You called render('#{options}'), which is a deprecated API call. Instead you use " +
+ "You called render('#{options}'), which is a deprecated API call. Instead you use " +
"render :file => #{options}. Calling render with just a string will be removed from Rails 2.0."
)
diff --git a/actionpack/lib/action_controller/flash.rb b/actionpack/lib/action_controller/flash.rb
index a166c1060c..6721a69d8c 100644
--- a/actionpack/lib/action_controller/flash.rb
+++ b/actionpack/lib/action_controller/flash.rb
@@ -29,8 +29,8 @@ module ActionController #:nodoc:
base.class_eval do
alias_method_chain :assign_shortcuts, :flash
- alias_method_chain :process_cleanup, :flash
- alias_method_chain :reset_session, :flash
+ alias_method_chain :process_cleanup, :flash
+ alias_method_chain :reset_session, :flash
end
end
@@ -92,7 +92,7 @@ module ActionController #:nodoc:
#
# flash.keep # keeps the entire flash
# flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded
- def keep(k=nil)
+ def keep(k = nil)
use(k, false)
end
@@ -100,7 +100,7 @@ module ActionController #:nodoc:
#
# flash.keep # keep entire flash available for the next action
# flash.discard(:warning) # discard the "warning" entry (it'll still be available for the current action)
- def discard(k=nil)
+ def discard(k = nil)
use(k)
end
@@ -116,6 +116,7 @@ module ActionController #:nodoc:
@used.delete(k)
end
end
+
(@used.keys - keys).each{|k| @used.delete k } # clean up after keys that could have been left over by calling reject! or shift on the flash
end
@@ -173,7 +174,7 @@ module ActionController #:nodoc:
# deprecated. use <tt>flash.keep</tt> instead
def keep_flash #:doc:
- warn 'keep_flash is deprecated; use flash.keep instead.'
+ ActiveSupport::Deprecation.warn 'keep_flash is deprecated; use flash.keep instead.'
flash.keep
end
end
diff --git a/actionpack/lib/action_controller/helpers.rb b/actionpack/lib/action_controller/helpers.rb
index 8aeef52868..dfc77851fc 100644
--- a/actionpack/lib/action_controller/helpers.rb
+++ b/actionpack/lib/action_controller/helpers.rb
@@ -1,7 +1,6 @@
module ActionController #:nodoc:
module Helpers #:nodoc:
def self.included(base)
-
# Initialize the base module to aggregate its helpers.
base.class_inheritable_accessor :master_helper_module
base.master_helper_module = Module.new
diff --git a/actionpack/lib/action_controller/integration.rb b/actionpack/lib/action_controller/integration.rb
index 545a39ac9a..7676d15c2d 100644
--- a/actionpack/lib/action_controller/integration.rb
+++ b/actionpack/lib/action_controller/integration.rb
@@ -182,7 +182,6 @@ module ActionController
end
private
-
class MockCGI < CGI #:nodoc:
attr_accessor :stdinput, :stdoutput, :env_table
diff --git a/actionpack/lib/action_controller/macros/auto_complete.rb b/actionpack/lib/action_controller/macros/auto_complete.rb
index c320ae79e1..8282e2c10c 100644
--- a/actionpack/lib/action_controller/macros/auto_complete.rb
+++ b/actionpack/lib/action_controller/macros/auto_complete.rb
@@ -8,6 +8,8 @@ module ActionController
base.extend(ClassMethods)
end
+ # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
+ #
# Example:
#
# # Controller
diff --git a/actionpack/lib/action_controller/macros/in_place_editing.rb b/actionpack/lib/action_controller/macros/in_place_editing.rb
index 40b083e3fc..d04f1ce1de 100644
--- a/actionpack/lib/action_controller/macros/in_place_editing.rb
+++ b/actionpack/lib/action_controller/macros/in_place_editing.rb
@@ -5,6 +5,8 @@ module ActionController
base.extend(ClassMethods)
end
+ # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships.
+ #
# Example:
#
# # Controller