Ruby on Rails | Screencasts | Download | Documentation | Weblog | Community | Source

Changeset 4952

Show
Ignore:
Timestamp:
09/03/06 23:22:24 (2 years ago)
Author:
david
Message:

Added deprecation language for in_place_editor and auto_complete_field that both pieces will become plugins by Rails 2.0 [DHH]

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • trunk/actionpack/CHANGELOG

    r4948 r4952  
    11*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] 
    24 
    35* Deprecated all of ActionController::Dependencies. All dependency loading is now handled from Active Support [DHH] 
  • trunk/actionpack/lib/action_controller/base.rb

    r4947 r4952  
    491491          when Symbol 
    492492            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 " + 
    494494              "route directly, like #{options}(). Using symbols and parameters with url_for will be removed from Rails 2.0." 
    495495            ) 
     
    681681            else 
    682682              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 " + 
    684684                "render :file => #{options}. Calling render with just a string will be removed from Rails 2.0." 
    685685              ) 
  • trunk/actionpack/lib/action_controller/flash.rb

    r4699 r4952  
    3030      base.class_eval do 
    3131        alias_method_chain :assign_shortcuts, :flash 
    32         alias_method_chain :process_cleanup, :flash 
    33         alias_method_chain :reset_session, :flash 
     32        alias_method_chain :process_cleanup, :flash 
     33        alias_method_chain :reset_session,    :flash 
    3434      end 
    3535    end 
     
    9393      #    flash.keep            # keeps the entire flash 
    9494      #    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) 
    9696        use(k, false) 
    9797      end 
     
    101101      #     flash.keep                 # keep entire flash available for the next action 
    102102      #     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) 
    104104        use(k) 
    105105      end 
     
    117117          end 
    118118        end 
     119 
    119120        (@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 
    120121      end 
     
    174175        # deprecated. use <tt>flash.keep</tt> instead 
    175176        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.' 
    177178          flash.keep 
    178179        end 
  • trunk/actionpack/lib/action_controller/helpers.rb

    r4312 r4952  
    22  module Helpers #:nodoc: 
    33    def self.included(base) 
    4  
    54      # Initialize the base module to aggregate its helpers. 
    65      base.class_inheritable_accessor :master_helper_module 
  • trunk/actionpack/lib/action_controller/integration.rb

    r4892 r4952  
    183183 
    184184      private 
    185  
    186185        class MockCGI < CGI #:nodoc: 
    187186          attr_accessor :stdinput, :stdoutput, :env_table 
  • trunk/actionpack/lib/action_controller/macros/auto_complete.rb

    r4310 r4952  
    99      end 
    1010 
     11      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     12      # 
    1113      # Example: 
    1214      # 
  • trunk/actionpack/lib/action_controller/macros/in_place_editing.rb

    r4310 r4952  
    66      end 
    77 
     8      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     9      # 
    810      # Example: 
    911      # 
  • trunk/actionpack/lib/action_view/helpers/java_script_macros_helper.rb

    r4713 r4952  
    88    # ActionController::Base.auto_complete_for. 
    99    module JavaScriptMacrosHelper 
     10      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     11      # 
    1012      # Makes an HTML element specified by the DOM ID +field_id+ become an in-place 
    1113      # editor of a property. 
     
    6567      end 
    6668       
     69      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     70      # 
    6771      # Renders the value of the specified object and method with in-place editing capabilities. 
    6872      # 
     
    7680      end 
    7781       
     82      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     83      # 
    7884      # Adds AJAX autocomplete functionality to the text input field with the  
    7985      # DOM ID specified by +field_id+. 
     
    154160      end 
    155161       
     162      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     163      # 
    156164      # Use this method in your view to generate a return for the AJAX autocomplete requests. 
    157165      # 
     
    173181      end 
    174182       
     183      # DEPRECATION WARNING: This method will become a separate plugin when Rails 2.0 ships. 
     184      # 
    175185      # Wrapper for text_field with added AJAX autocompletion functionality. 
    176186      # 
  • trunk/actionpack/test/template/java_script_macros_helper_test.rb

    r4713 r4952  
    5858    assert_match %(<style type="text/css">), 
    5959      text_field_with_auto_complete(:message, :recipient) 
     60 
    6061    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>), 
    6162      text_field_with_auto_complete(:message, :recipient, {}, :skip_style => true) 
  • trunk/activesupport/lib/active_support/deprecation.rb

    r4943 r4952  
    3939        def deprecation_message(callstack, message = nil) 
    4040          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})" 
    4343        end 
    4444