aboutsummaryrefslogtreecommitdiffstats
path: root/actionpack/lib/action_view
diff options
context:
space:
mode:
Diffstat (limited to 'actionpack/lib/action_view')
-rw-r--r--actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb1
-rw-r--r--actionpack/lib/action_view/helpers/capture_helper.rb1
-rw-r--r--actionpack/lib/action_view/helpers/form_helper.rb11
-rw-r--r--actionpack/lib/action_view/helpers/form_options_helper.rb3
-rw-r--r--actionpack/lib/action_view/helpers/form_tag_helper.rb3
-rw-r--r--actionpack/lib/action_view/helpers/number_helper.rb1
-rw-r--r--actionpack/lib/action_view/helpers/output_safety_helper.rb1
-rw-r--r--actionpack/lib/action_view/helpers/record_tag_helper.rb2
-rw-r--r--actionpack/lib/action_view/helpers/rendering_helper.rb1
-rw-r--r--actionpack/lib/action_view/helpers/sanitize_helper.rb12
-rw-r--r--actionpack/lib/action_view/helpers/tags/select.rb1
-rw-r--r--actionpack/lib/action_view/helpers/url_helper.rb1
-rw-r--r--actionpack/lib/action_view/template/resolver.rb1
13 files changed, 0 insertions, 39 deletions
diff --git a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
index 57b0627225..d7df9ea0d5 100644
--- a/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
+++ b/actionpack/lib/action_view/helpers/asset_tag_helpers/stylesheet_tag_helpers.rb
@@ -139,7 +139,6 @@ module ActionView
# you have too many stylesheets for IE to load.
#
# stylesheet_link_tag :all, :concat => true
- #
def stylesheet_link_tag(*sources)
@stylesheet_include ||= StylesheetIncludeTag.new(config, asset_paths)
@stylesheet_include.include_tag(*sources)
diff --git a/actionpack/lib/action_view/helpers/capture_helper.rb b/actionpack/lib/action_view/helpers/capture_helper.rb
index 397738dd98..c1f47a2eac 100644
--- a/actionpack/lib/action_view/helpers/capture_helper.rb
+++ b/actionpack/lib/action_view/helpers/capture_helper.rb
@@ -33,7 +33,6 @@ module ActionView
# <body>
# <b><%= @greeting %></b>
# </body></html>
- #
def capture(*args)
value = nil
buffer = with_output_buffer { value = yield(*args) }
diff --git a/actionpack/lib/action_view/helpers/form_helper.rb b/actionpack/lib/action_view/helpers/form_helper.rb
index 6510610034..61e7a89585 100644
--- a/actionpack/lib/action_view/helpers/form_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_helper.rb
@@ -763,7 +763,6 @@ module ActionView
#
# text_field(:snippet, :code, :size => 20, :class => 'code_input')
# # => <input type="text" id="snippet_code" name="snippet[code]" size="20" value="#{@snippet.code}" class="code_input" />
- #
def text_field(object_name, method, options = {})
Tags::TextField.new(object_name, method, self, options).render
end
@@ -785,7 +784,6 @@ module ActionView
#
# password_field(:account, :pin, :size => 20, :class => 'form_input')
# # => <input type="password" id="account_pin" name="account[pin]" size="20" class="form_input" />
- #
def password_field(object_name, method, options = {})
Tags::PasswordField.new(object_name, method, self, options).render
end
@@ -824,7 +822,6 @@ module ActionView
#
# file_field(:attachment, :file, :class => 'file_input')
# # => <input type="file" id="attachment_file" name="attachment[file]" class="file_input" />
- #
def file_field(object_name, method, options = {})
Tags::FileField.new(object_name, method, self, options).render
end
@@ -913,7 +910,6 @@ module ActionView
# check_box("eula", "accepted", { :class => 'eula_check' }, "yes", "no")
# # => <input name="eula[accepted]" type="hidden" value="no" />
# # <input type="checkbox" class="eula_check" id="eula_accepted" name="eula[accepted]" value="yes" />
- #
def check_box(object_name, method, options = {}, checked_value = "1", unchecked_value = "0")
Tags::CheckBox.new(object_name, method, self, checked_value, unchecked_value, options).render
end
@@ -966,7 +962,6 @@ module ActionView
#
# telephone_field("user", "phone")
# # => <input id="user_phone" name="user[phone]" type="tel" />
- #
def telephone_field(object_name, method, options = {})
Tags::TelField.new(object_name, method, self, options).render
end
@@ -985,7 +980,6 @@ module ActionView
# @user.born_on = Date.new(1984, 1, 27)
# date_field("user", "born_on", value: "1984-05-12")
# # => <input id="user_born_on" name="user[born_on]" type="date" value="1984-05-12" />
- #
def date_field(object_name, method, options = {})
Tags::DateField.new(object_name, method, self, options).render
end
@@ -1002,7 +996,6 @@ module ActionView
# === Example
# time_field("task", "started_at")
# # => <input id="task_started_at" name="task[started_at]" type="time" />
- #
def time_field(object_name, method, options = {})
Tags::TimeField.new(object_name, method, self, options).render
end
@@ -1011,7 +1004,6 @@ module ActionView
#
# url_field("user", "homepage")
# # => <input id="user_homepage" name="user[homepage]" type="url" />
- #
def url_field(object_name, method, options = {})
Tags::UrlField.new(object_name, method, self, options).render
end
@@ -1020,7 +1012,6 @@ module ActionView
#
# email_field("user", "address")
# # => <input id="user_address" name="user[address]" type="email" />
- #
def email_field(object_name, method, options = {})
Tags::EmailField.new(object_name, method, self, options).render
end
@@ -1200,7 +1191,6 @@ module ActionView
# submit:
# post:
# create: "Add %{model}"
- #
def submit(value=nil, options={})
value, options = nil, value if value.is_a?(Hash)
value ||= submit_default_value
@@ -1233,7 +1223,6 @@ module ActionView
# submit:
# post:
# create: "Add %{model}"
- #
def button(value=nil, options={})
value, options = nil, value if value.is_a?(Hash)
value ||= submit_default_value
diff --git a/actionpack/lib/action_view/helpers/form_options_helper.rb b/actionpack/lib/action_view/helpers/form_options_helper.rb
index eef426703d..90fa1f3520 100644
--- a/actionpack/lib/action_view/helpers/form_options_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_options_helper.rb
@@ -98,7 +98,6 @@ module ActionView
# <option value="3">Jokes</option>
# <option value="4">Poems</option>
# </select>
- #
module FormOptionsHelper
# ERB::Util can mask some helpers like textilize. Make sure to include them.
include TextHelper
@@ -154,7 +153,6 @@ module ActionView
# key in the query string, that works for ordinary forms.
#
# In case if you don't want the helper to generate this hidden field you can specify <tt>:include_blank => false</tt> option.
- #
def select(object, method, choices, options = {}, html_options = {})
Tags::Select.new(object, method, self, choices, options, html_options).render
end
@@ -241,7 +239,6 @@ module ActionView
# <option value="2">Ireland</option>
# </optgroup>
# </select>
- #
def grouped_collection_select(object, method, collection, group_method, group_label_method, option_key_method, option_value_method, options = {}, html_options = {})
Tags::GroupedCollectionSelect.new(object, method, self, collection, group_method, group_label_method, option_key_method, option_value_method, options, html_options).render
end
diff --git a/actionpack/lib/action_view/helpers/form_tag_helper.rb b/actionpack/lib/action_view/helpers/form_tag_helper.rb
index e65b4e3e95..07453c4b50 100644
--- a/actionpack/lib/action_view/helpers/form_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/form_tag_helper.rb
@@ -63,7 +63,6 @@ module ActionView
#
# form_tag('http://far.away.com/form', :authenticity_token => "cf50faa3fe97702ca1ae")
# # form with custom authenticity token
- #
def form_tag(url_for_options = {}, options = {}, &block)
html_options = html_options_for_form(url_for_options, options)
if block_given?
@@ -409,7 +408,6 @@ module ActionView
#
# submit_tag "Save", :confirm => "Are you sure?"
# # => <input name='commit' type='submit' value='Save' data-confirm="Are you sure?" />
- #
def submit_tag(value = "Save changes", options = {})
options = options.stringify_keys
@@ -446,7 +444,6 @@ module ActionView
# # => <button name="button" type="button">
# # <strong>Ask me!</strong>
# # </button>
- #
def button_tag(content_or_options = nil, options = nil, &block)
options = content_or_options if block_given? && content_or_options.is_a?(Hash)
options ||= {}
diff --git a/actionpack/lib/action_view/helpers/number_helper.rb b/actionpack/lib/action_view/helpers/number_helper.rb
index dfc26acfad..9e43a1faf1 100644
--- a/actionpack/lib/action_view/helpers/number_helper.rb
+++ b/actionpack/lib/action_view/helpers/number_helper.rb
@@ -514,7 +514,6 @@ module ActionView
# number_to_human(343, :units => :distance, :precision => 1) # => "300 meters"
# number_to_human(1, :units => :distance) # => "1 meter"
# number_to_human(0.34, :units => :distance) # => "34 centimeters"
- #
def number_to_human(number, options = {})
options = options.symbolize_keys
diff --git a/actionpack/lib/action_view/helpers/output_safety_helper.rb b/actionpack/lib/action_view/helpers/output_safety_helper.rb
index 2e7e9dc50c..891dd859fa 100644
--- a/actionpack/lib/action_view/helpers/output_safety_helper.rb
+++ b/actionpack/lib/action_view/helpers/output_safety_helper.rb
@@ -26,7 +26,6 @@ module ActionView #:nodoc:
#
# safe_join(["<p>foo</p>".html_safe, "<p>bar</p>".html_safe], "<br />".html_safe)
# # => "<p>foo</p><br /><p>bar</p>"
- #
def safe_join(array, sep=$,)
sep = ERB::Util.html_escape(sep)
diff --git a/actionpack/lib/action_view/helpers/record_tag_helper.rb b/actionpack/lib/action_view/helpers/record_tag_helper.rb
index 9b35f076e5..8734136f39 100644
--- a/actionpack/lib/action_view/helpers/record_tag_helper.rb
+++ b/actionpack/lib/action_view/helpers/record_tag_helper.rb
@@ -29,7 +29,6 @@ module ActionView
#
# <div id="person_123" class="person foo"> Joe Bloggs </div>
# <div id="person_124" class="person foo"> Jane Bloggs </div>
- #
def div_for(record, *args, &block)
content_tag_for(:div, record, *args, &block)
end
@@ -79,7 +78,6 @@ module ActionView
# produces:
#
# <li id="person_123" class="person bar">...
- #
def content_tag_for(tag_name, single_or_multiple_records, prefix = nil, options = nil, &block)
options, prefix = prefix, nil if prefix.is_a?(Hash)
diff --git a/actionpack/lib/action_view/helpers/rendering_helper.rb b/actionpack/lib/action_view/helpers/rendering_helper.rb
index 626e1a1ab7..55fb443929 100644
--- a/actionpack/lib/action_view/helpers/rendering_helper.rb
+++ b/actionpack/lib/action_view/helpers/rendering_helper.rb
@@ -75,7 +75,6 @@ module ActionView
# <html>
# Hello David
# </html>
- #
def _layout_for(*args, &block)
name = args.first
diff --git a/actionpack/lib/action_view/helpers/sanitize_helper.rb b/actionpack/lib/action_view/helpers/sanitize_helper.rb
index a727b910e5..ba74217c12 100644
--- a/actionpack/lib/action_view/helpers/sanitize_helper.rb
+++ b/actionpack/lib/action_view/helpers/sanitize_helper.rb
@@ -55,7 +55,6 @@ module ActionView
# resulting markup is valid (conforming to a document type) or even well-formed.
# The output may still contain e.g. unescaped '<', '>', '&' characters and
# confuse browsers.
- #
def sanitize(html, options = {})
self.class.white_list_sanitizer.sanitize(html, options).try(:html_safe)
end
@@ -144,7 +143,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.full_sanitizer = MySpecialSanitizer.new
# end
- #
def full_sanitizer
@full_sanitizer ||= HTML::FullSanitizer.new
end
@@ -155,7 +153,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.link_sanitizer = MySpecialSanitizer.new
# end
- #
def link_sanitizer
@link_sanitizer ||= HTML::LinkSanitizer.new
end
@@ -166,7 +163,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.white_list_sanitizer = MySpecialSanitizer.new
# end
- #
def white_list_sanitizer
@white_list_sanitizer ||= HTML::WhiteListSanitizer.new
end
@@ -176,7 +172,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_uri_attributes = 'lowsrc', 'target'
# end
- #
def sanitized_uri_attributes=(attributes)
HTML::WhiteListSanitizer.uri_attributes.merge(attributes)
end
@@ -186,7 +181,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_bad_tags = 'embed', 'object'
# end
- #
def sanitized_bad_tags=(attributes)
HTML::WhiteListSanitizer.bad_tags.merge(attributes)
end
@@ -196,7 +190,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_allowed_tags = 'table', 'tr', 'td'
# end
- #
def sanitized_allowed_tags=(attributes)
HTML::WhiteListSanitizer.allowed_tags.merge(attributes)
end
@@ -206,7 +199,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_allowed_attributes = 'onclick', 'longdesc'
# end
- #
def sanitized_allowed_attributes=(attributes)
HTML::WhiteListSanitizer.allowed_attributes.merge(attributes)
end
@@ -216,7 +208,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_allowed_css_properties = 'expression'
# end
- #
def sanitized_allowed_css_properties=(attributes)
HTML::WhiteListSanitizer.allowed_css_properties.merge(attributes)
end
@@ -226,7 +217,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_allowed_css_keywords = 'expression'
# end
- #
def sanitized_allowed_css_keywords=(attributes)
HTML::WhiteListSanitizer.allowed_css_keywords.merge(attributes)
end
@@ -236,7 +226,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_shorthand_css_properties = 'expression'
# end
- #
def sanitized_shorthand_css_properties=(attributes)
HTML::WhiteListSanitizer.shorthand_css_properties.merge(attributes)
end
@@ -246,7 +235,6 @@ module ActionView
# class Application < Rails::Application
# config.action_view.sanitized_allowed_protocols = 'ssh', 'feed'
# end
- #
def sanitized_allowed_protocols=(attributes)
HTML::WhiteListSanitizer.allowed_protocols.merge(attributes)
end
diff --git a/actionpack/lib/action_view/helpers/tags/select.rb b/actionpack/lib/action_view/helpers/tags/select.rb
index 53a108b7e6..4d94ee2c23 100644
--- a/actionpack/lib/action_view/helpers/tags/select.rb
+++ b/actionpack/lib/action_view/helpers/tags/select.rb
@@ -31,7 +31,6 @@ module ActionView
#
# [nil, []]
# { nil => [] }
- #
def grouped_choices?
!@choices.empty? && @choices.first.respond_to?(:last) && Array === @choices.first.last
end
diff --git a/actionpack/lib/action_view/helpers/url_helper.rb b/actionpack/lib/action_view/helpers/url_helper.rb
index 7e69547dab..2e45a2ae0f 100644
--- a/actionpack/lib/action_view/helpers/url_helper.rb
+++ b/actionpack/lib/action_view/helpers/url_helper.rb
@@ -586,7 +586,6 @@ module ActionView
#
# current_page?(:controller => 'product', :action => 'index')
# # => false
- #
def current_page?(options)
unless request
raise "You cannot use helpers that need to determine the current " \
diff --git a/actionpack/lib/action_view/template/resolver.rb b/actionpack/lib/action_view/template/resolver.rb
index fa2038f78d..d267a8466a 100644
--- a/actionpack/lib/action_view/template/resolver.rb
+++ b/actionpack/lib/action_view/template/resolver.rb
@@ -215,7 +215,6 @@ module ActionView
# * <tt>:locale</tt> - possible locale versions
# * <tt>:formats</tt> - possible request formats (for example html, json, xml...)
# * <tt>:handlers</tt> - possible handlers (for example erb, haml, builder...)
- #
class FileSystemResolver < PathResolver
def initialize(path, pattern=nil)
raise ArgumentError, "path already is a Resolver class" if path.is_a?(Resolver)