aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_controller/metal
diff options
context:
space:
mode:
authorHenrik Hodne <dvyjones@dvyjones.com>2012-05-20 01:29:13 +0200
committerHenrik Hodne <dvyjones@dvyjones.com>2012-05-20 01:29:13 +0200
commitfa6d921e11363e9b8c4bc10f7aed0b9faffdc33a (patch)
tree1e4fd51d0d58cb5b5f210eeb6842ca3ada999243 /actionpack/lib/action_controller/metal
parent7eb09aed874dbb5f50a9ac0d0dec22e42f6161be (diff)
downloadrails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.tar.gz
rails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.tar.bz2
rails-fa6d921e11363e9b8c4bc10f7aed0b9faffdc33a.zip
Remove blank trailing comments
For future reference, this is the regex I used: ^\s*#\s*\n(?!\s*#). Replace with the first match, and voilĂ ! Note that the regex matches a little bit too much, so you probably want to `git add -i .` and go through every single diff to check if it actually should be changed.
Diffstat (limited to 'actionpack/lib/action_controller/metal')
-rw-r--r--actionpack/lib/action_controller/metal/helpers.rb1
-rw-r--r--actionpack/lib/action_controller/metal/mime_responds.rb1
-rw-r--r--actionpack/lib/action_controller/metal/responder.rb10
-rw-r--r--actionpack/lib/action_controller/metal/streaming.rb1
4 files changed, 0 insertions, 13 deletions
diff --git a/actionpack/lib/action_controller/metal/helpers.rb b/actionpack/lib/action_controller/metal/helpers.rb
index 86d061e3b7..598bc6c5cb 100644
--- a/actionpack/lib/action_controller/metal/helpers.rb
+++ b/actionpack/lib/action_controller/metal/helpers.rb
@@ -47,7 +47,6 @@ module ActionController
#
# 23 Aug 11:30 | Carolina Railhawks Soccer Match
# N/A | Carolina Railhaws Training Workshop
- #
module Helpers
extend ActiveSupport::Concern
diff --git a/actionpack/lib/action_controller/metal/mime_responds.rb b/actionpack/lib/action_controller/metal/mime_responds.rb
index 0b800c3c62..d9fc777250 100644
--- a/actionpack/lib/action_controller/metal/mime_responds.rb
+++ b/actionpack/lib/action_controller/metal/mime_responds.rb
@@ -52,7 +52,6 @@ module ActionController #:nodoc:
end
# Clear all mime types in <tt>respond_to</tt>.
- #
def clear_respond_to
self.mimes_for_respond_to = Hash.new.freeze
end
diff --git a/actionpack/lib/action_controller/metal/responder.rb b/actionpack/lib/action_controller/metal/responder.rb
index 83407846dc..5aa3b2ca15 100644
--- a/actionpack/lib/action_controller/metal/responder.rb
+++ b/actionpack/lib/action_controller/metal/responder.rb
@@ -142,13 +142,11 @@ module ActionController #:nodoc:
# Initializes a new responder an invoke the proper format. If the format is
# not defined, call to_format.
- #
def self.call(*args)
new(*args).respond
end
# Main entry point for responder responsible to dispatch to the proper format.
- #
def respond
method = "to_#{format}"
respond_to?(method) ? send(method) : to_format
@@ -156,7 +154,6 @@ module ActionController #:nodoc:
# HTML format does not render the resource, it always attempt to render a
# template.
- #
def to_html
default_render
rescue ActionView::MissingTemplate => e
@@ -171,7 +168,6 @@ module ActionController #:nodoc:
# All other formats follow the procedure below. First we try to render a
# template, if the template is not available, we verify if the resource
# responds to :to_format and display it.
- #
def to_format
if get? || !has_errors? || response_overridden?
default_render
@@ -209,14 +205,12 @@ module ActionController #:nodoc:
end
# Checks whether the resource responds to the current format or not.
- #
def resourceful?
resource.respond_to?("to_#{format}")
end
# Returns the resource location by retrieving it from the options or
# returning the resources array.
- #
def resource_location
options[:location] || resources
end
@@ -225,7 +219,6 @@ module ActionController #:nodoc:
# If a response block was given, use it, otherwise call render on
# controller.
- #
def default_render
if @default_response
@default_response.call(options)
@@ -250,7 +243,6 @@ module ActionController #:nodoc:
# Results in:
#
# render :xml => @user, :status => :created
- #
def display(resource, given_options={})
controller.render given_options.merge!(options).merge!(format => resource)
end
@@ -260,14 +252,12 @@ module ActionController #:nodoc:
end
# Check whether the resource has errors.
- #
def has_errors?
resource.respond_to?(:errors) && !resource.errors.empty?
end
# By default, render the <code>:edit</code> action for HTML requests with errors, unless
# the verb was POST.
- #
def default_action
@action ||= DEFAULT_ACTIONS_FOR_VERBS[request.request_method_symbol]
end
diff --git a/actionpack/lib/action_controller/metal/streaming.rb b/actionpack/lib/action_controller/metal/streaming.rb
index eeb37db2e7..0c3caa9514 100644
--- a/actionpack/lib/action_controller/metal/streaming.rb
+++ b/actionpack/lib/action_controller/metal/streaming.rb
@@ -194,7 +194,6 @@ module ActionController #:nodoc:
# ==== Passenger
#
# To be described.
- #
module Streaming
extend ActiveSupport::Concern