diff options
Diffstat (limited to 'actionpack/lib')
4 files changed, 9 insertions, 6 deletions
diff --git a/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb b/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb index e9b50ff8ce..114b0e73c9 100644 --- a/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb +++ b/actionpack/lib/action_controller/vendor/html-scanner/html/sanitizer.rb @@ -99,7 +99,7 @@ module HTML      self.allowed_protocols      = Set.new(%w(ed2k ftp http https irc mailto news gopher nntp telnet webcal xmpp callto        feed svn urn aim rsync tag ssh sftp rtsp afs)) -    # Specifies the default Set of acceptable css keywords that #sanitize and #sanitize_css will accept. +    # Specifies the default Set of acceptable css properties that #sanitize and #sanitize_css will accept.      self.allowed_css_properties = Set.new(%w(azimuth background-color border-bottom-color border-collapse        border-color border-left-color border-right-color border-top-color clear color cursor direction display        elevation float font font-family font-size font-style font-variant font-weight height letter-spacing line-height diff --git a/actionpack/lib/action_dispatch/http/response.rb b/actionpack/lib/action_dispatch/http/response.rb index 078229efd2..cc46f9983c 100644 --- a/actionpack/lib/action_dispatch/http/response.rb +++ b/actionpack/lib/action_dispatch/http/response.rb @@ -29,7 +29,7 @@ module ActionDispatch # :nodoc:    #  class DemoControllerTest < ActionDispatch::IntegrationTest    #    def test_print_root_path_to_console    #      get('/') -  #      puts @response.body +  #      puts response.body    #    end    #  end    class Response diff --git a/actionpack/lib/action_dispatch/middleware/flash.rb b/actionpack/lib/action_dispatch/middleware/flash.rb index cff0877030..c92c91df65 100644 --- a/actionpack/lib/action_dispatch/middleware/flash.rb +++ b/actionpack/lib/action_dispatch/middleware/flash.rb @@ -17,7 +17,7 @@ module ActionDispatch    #     def create    #       # save post    #       flash[:notice] = "Post successfully created" -  #       redirect_to posts_path(@post) +  #       redirect_to @post    #     end    #    #     def show diff --git a/actionpack/lib/action_dispatch/routing/redirection.rb b/actionpack/lib/action_dispatch/routing/redirection.rb index 617b24b46a..f281738e6f 100644 --- a/actionpack/lib/action_dispatch/routing/redirection.rb +++ b/actionpack/lib/action_dispatch/routing/redirection.rb @@ -67,10 +67,13 @@ module ActionDispatch        # params, depending of how many arguments your block accepts. A string is required as a        # return value.        # -      #   match 'jokes/:number', :to => redirect do |params, request| -      #     path = (params[:number].to_i.even? ? "/wheres-the-beef" : "/i-love-lamp") +      #   match 'jokes/:number', :to => redirect { |params, request| +      #     path = (params[:number].to_i.even? ? "wheres-the-beef" : "i-love-lamp")        #     "http://#{request.host_with_port}/#{path}" -      #   end +      #   } +      # +      # Note that the `do end` syntax for the redirect block wouldn't work, as Ruby would pass +      # the block to `match` instead of `redirect`. Use `{ ... }` instead.        #        # The options version of redirect allows you to supply only the parts of the url which need        # to change, it also supports interpolation of the path similar to the first example.  | 
