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

Ticket #7319: small_actioncontroller_doc_fixes_and_additions.diff

File small_actioncontroller_doc_fixes_and_additions.diff, 4.7 kB (added by jeremymcanally, 2 years ago)
  • actionpack/lib/action_controller/base.rb

    old new  
    535535        self.class.controller_path 
    536536      end 
    537537 
     538      # Test whether the session is enabled for this request. 
    538539      def session_enabled? 
    539540        request.session_options[:disabled] != false 
    540541      end 
  • actionpack/lib/action_controller/url_rewriter.rb

    old new  
    7676    alias_method :to_s, :to_str 
    7777 
    7878    private 
     79      # Given a path and options, returns a rewritten URL string 
    7980      def rewrite_url(path, options) 
    8081        rewritten_url = "" 
    8182        unless options[:only_path] 
     
    9192        rewritten_url 
    9293      end 
    9394 
     95      # Given a Hash of options, generates a route 
    9496      def rewrite_path(options) 
    9597        options = options.symbolize_keys 
    9698        options.update(options[:params].symbolize_keys) if options[:params] 
  • actionpack/lib/action_controller/assertions/routing_assertions.rb

    old new  
    6666      end 
    6767 
    6868      private 
     69        # Recognizes the route for a given path. 
    6970        def recognized_request_for(path, request_method = nil) 
    7071          path = "/#{path}" unless path.first == '/' 
    7172 
  • actionpack/lib/action_controller/assertions/response_assertions.rb

    old new  
    119119      end 
    120120 
    121121      private 
     122        # Recognizes the route for a given path. 
    122123        def recognized_request_for(path, request_method = nil) 
    123124          path = "/#{path}" unless path.first == '/' 
    124125 
     
    131132          request 
    132133        end 
    133134 
     135        # Proxy to to_param if the object will respond to it. 
    134136        def parameterize(value) 
    135137          value.respond_to?(:to_param) ? value.to_param : value 
    136138        end 
  • actionpack/lib/action_controller/assertions/dom_assertions.rb

    old new  
    11module ActionController 
    22  module Assertions 
    33    module DomAssertions 
    4       # test 2 html strings to be equivalent, i.e. identical up to reordering of attributes 
     4      # Test two HTML strings for equivalency (e.g., identical up to reordering of attributes) 
    55      def assert_dom_equal(expected, actual, message="") 
    66        clean_backtrace do 
    77          expected_dom = HTML::Document.new(expected).root 
     
    1111        end 
    1212      end 
    1313       
    14       # negated form of +assert_dom_equivalent+ 
     14      # The negated form of +assert_dom_equivalent+. 
    1515      def assert_dom_not_equal(expected, actual, message="") 
    1616        clean_backtrace do 
    1717          expected_dom = HTML::Document.new(expected).root 
  • actionpack/lib/action_controller/assertions/model_assertions.rb

    old new  
    11module ActionController 
    22  module Assertions 
    33    module ModelAssertions 
    4       # ensures that the passed record is valid by active record standards. returns the error messages if not 
     4      # Ensures that the passed record is valid by ActiveRecord standards and returns any error messages if it is not. 
    55      def assert_valid(record) 
    66        clean_backtrace do 
    77          assert record.valid?, record.errors.full_messages.join("\n") 
  • railties/lib/initializer.rb

    old new  
    201201      silence_warnings do 
    202202        config = configuration 
    203203        constants = self.class.constants 
     204         
    204205        eval(IO.read(configuration.environment_path), binding, configuration.environment_path) 
     206         
    205207        (self.class.constants - constants).each do |const| 
    206208          Object.const_set(const, self.class.const_get(const)) 
    207209        end