Changeset 4952
- Timestamp:
- 09/03/06 23:22:24 (2 years ago)
- Files:
-
- trunk/actionpack/CHANGELOG (modified) (1 diff)
- trunk/actionpack/lib/action_controller/base.rb (modified) (2 diffs)
- trunk/actionpack/lib/action_controller/flash.rb (modified) (5 diffs)
- trunk/actionpack/lib/action_controller/helpers.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/integration.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/macros/auto_complete.rb (modified) (1 diff)
- trunk/actionpack/lib/action_controller/macros/in_place_editing.rb (modified) (1 diff)
- trunk/actionpack/lib/action_view/helpers/java_script_macros_helper.rb (modified) (5 diffs)
- trunk/actionpack/test/template/java_script_macros_helper_test.rb (modified) (1 diff)
- trunk/activesupport/lib/active_support/deprecation.rb (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
trunk/actionpack/CHANGELOG
r4948 r4952 1 1 *SVN* 2 3 * Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH] 2 4 3 5 * Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH] trunk/actionpack/lib/action_controller/base.rb
r4947 r4952 491 491 when Symbol 492 492 ActiveSupport::Deprecation.warn( 493 " WARNING:You called url_for(:#{options}), which is a deprecated API call. Instead you should use the named " +493 "You called url_for(:#{options}), which is a deprecated API call. Instead you should use the named " + 494 494 "route directly, like #{options}(). Using symbols and parameters with url_for will be removed from Rails 2.0." 495 495 ) … … 681 681 else 682 682 ActiveSupport::Deprecation.warn( 683 " WARNING:You called render('#{options}'), which is a deprecated API call. Instead you use " +683 "You called render('#{options}'), which is a deprecated API call. Instead you use " + 684 684 "render :file => #{options}. Calling render with just a string will be removed from Rails 2.0." 685 685 ) trunk/actionpack/lib/action_controller/flash.rb
r4699 r4952 30 30 base.class_eval do 31 31 alias_method_chain :assign_shortcuts, :flash 32 alias_method_chain :process_cleanup, :flash33 alias_method_chain :reset_session, :flash32 alias_method_chain :process_cleanup, :flash 33 alias_method_chain :reset_session, :flash 34 34 end 35 35 end … … 93 93 # flash.keep # keeps the entire flash 94 94 # flash.keep(:notice) # keeps only the "notice" entry, the rest of the flash is discarded 95 def keep(k =nil)95 def keep(k = nil) 96 96 use(k, false) 97 97 end … … 101 101 # flash.keep # keep entire flash available for the next action 102 102 # flash.discard(:warning) # discard the "warning" entry (it'll still be available for the current action) 103 def discard(k =nil)103 def discard(k = nil) 104 104 use(k) 105 105 end … … 117 117 end 118 118 end 119 119 120 (@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 120 121 end … … 174 175 # deprecated. use <tt>flash.keep</tt> instead 175 176 def keep_flash #:doc: 176 warn 'keep_flash is deprecated; use flash.keep instead.'177 ActiveSupport::Deprecation.warn 'keep_flash is deprecated; use flash.keep instead.' 177 178 flash.keep 178 179 end trunk/actionpack/lib/action_controller/helpers.rb
r4312 r4952 2 2 module Helpers #:nodoc: 3 3 def self.included(base) 4 5 4 # Initialize the base module to aggregate its helpers. 6 5 base.class_inheritable_accessor :master_helper_module trunk/actionpack/lib/action_controller/integration.rb
r4892 r4952 183 183 184 184 private 185 186 185 class MockCGI < CGI #:nodoc: 187 186 attr_accessor :stdinput, :stdoutput, :env_table trunk/actionpack/lib/action_controller/macros/auto_complete.rb
r4310 r4952 9 9 end 10 10 11 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 12 # 11 13 # Example: 12 14 # trunk/actionpack/lib/action_controller/macros/in_place_editing.rb
r4310 r4952 6 6 end 7 7 8 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 9 # 8 10 # Example: 9 11 # trunk/actionpack/lib/action_view/helpers/java_script_macros_helper.rb
r4713 r4952 8 8 # ActionController::Base.auto_complete_for. 9 9 module JavaScriptMacrosHelper 10 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 11 # 10 12 # Makes an HTML element specified by the DOM ID +field_id+ become an in-place 11 13 # editor of a property. … … 65 67 end 66 68 69 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 70 # 67 71 # Renders the value of the specified object and method with in-place editing capabilities. 68 72 # … … 76 80 end 77 81 82 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 83 # 78 84 # Adds AJAX autocomplete functionality to the text input field with the 79 85 # DOM ID specified by +field_id+. … … 154 160 end 155 161 162 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 163 # 156 164 # Use this method in your view to generate a return for the AJAX autocomplete requests. 157 165 # … … 173 181 end 174 182 183 # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 184 # 175 185 # Wrapper for text_field with added AJAX autocompletion functionality. 176 186 # trunk/actionpack/test/template/java_script_macros_helper_test.rb
r4713 r4952 58 58 assert_match %(<style type="text/css">), 59 59 text_field_with_auto_complete(:message, :recipient) 60 60 61 assert_dom_equal %(<input id=\"message_recipient\" name=\"message[recipient]\" size=\"30\" type=\"text\" /><div class=\"auto_complete\" id=\"message_recipient_auto_complete\"></div><script type=\"text/javascript\">\n//<![CDATA[\nvar message_recipient_auto_completer = new Ajax.Autocompleter('message_recipient', 'message_recipient_auto_complete', 'http://www.example.com/auto_complete_for_message_recipient', {})\n//]]>\n</script>), 61 62 text_field_with_auto_complete(:message, :recipient, {}, :skip_style => true) trunk/activesupport/lib/active_support/deprecation.rb
r4943 r4952 39 39 def deprecation_message(callstack, message = nil) 40 40 file, line, method = extract_callstack(callstack) 41 message ||= " WARNING:#{method} is deprecated and will be removed from Rails 2.0."42 " #{message}. See http://www.rubyonrails.org/deprecation for details. (#{method} at #{file}:#{line})"41 message ||= "#{method} is deprecated and will be removed from Rails 2.0." 42 "DEPRECATION WARNING: #{message}. See http://www.rubyonrails.org/deprecation for details. (#{method} at #{file}:#{line})" 43 43 end 44 44