提交 b232c514 编写于 作者: A Akira Matsuda

No need to nodoc private methods

上级 91fa2b71
......@@ -215,7 +215,7 @@ def cache_fragment_name(name = {}, skip_digest: nil, virtual_path: nil)
private
def fragment_name_with_digest(name, virtual_path) #:nodoc:
def fragment_name_with_digest(name, virtual_path)
virtual_path ||= @virtual_path
if virtual_path
name = controller.url_for(name).split("://").last if name.is_a?(Hash)
......@@ -226,7 +226,7 @@ def fragment_name_with_digest(name, virtual_path) #:nodoc:
end
end
def fragment_for(name = {}, options = nil, &block) #:nodoc:
def fragment_for(name = {}, options = nil, &block)
if content = read_fragment_for(name, options)
@cache_hit = true
content
......@@ -236,11 +236,11 @@ def fragment_for(name = {}, options = nil, &block) #:nodoc:
end
end
def read_fragment_for(name, options) #:nodoc:
def read_fragment_for(name, options)
controller.read_fragment(name, options)
end
def write_fragment_for(name, options) #:nodoc:
def write_fragment_for(name, options)
# VIEW TODO: Make #capture usable outside of ERB
# This dance is needed because Builder can't use capture
pos = output_buffer.length
......
......@@ -24,7 +24,7 @@ def render_component(builder)
builder.check_box + builder.label
end
def hidden_field_name #:nodoc:
def hidden_field_name
"#{super}[]"
end
end
......
......@@ -43,7 +43,7 @@ def instantiate_builder(builder_class, item, value, text, html_options)
# Generate default options for collection helpers, such as :checked and
# :disabled.
def default_html_options_for_collection(item, value) #:nodoc:
def default_html_options_for_collection(item, value)
html_options = @html_options.dup
[:checked, :selected, :disabled, :readonly].each do |option|
......@@ -67,11 +67,11 @@ def default_html_options_for_collection(item, value) #:nodoc:
html_options
end
def sanitize_attribute_name(value) #:nodoc:
def sanitize_attribute_name(value)
"#{sanitized_method_name}_#{sanitized_value(value)}"
end
def render_collection #:nodoc:
def render_collection
@collection.map do |item|
value = value_for_collection(item, @value_method)
text = value_for_collection(item, @text_method)
......@@ -82,7 +82,7 @@ def render_collection #:nodoc:
end.join.html_safe
end
def render_collection_for(builder_class, &block) #:nodoc:
def render_collection_for(builder_class, &block)
options = @options.stringify_keys
rendered_collection = render_collection do |item, value, text, default_html_options|
builder = instantiate_builder(builder_class, item, value, text, default_html_options)
......@@ -103,12 +103,12 @@ def render_collection_for(builder_class, &block) #:nodoc:
end
end
def hidden_field #:nodoc:
def hidden_field
hidden_name = @html_options[:name] || hidden_field_name
@template_object.hidden_field_tag(hidden_name, "", id: nil)
end
def hidden_field_name #:nodoc:
def hidden_field_name
"#{tag_name(false, @options[:index])}"
end
end
......
......@@ -614,7 +614,7 @@ def method_tag(method)
#
# to_form_params({ name: 'Denmark' }, 'country')
# # => [{name: 'country[name]', value: 'Denmark'}]
def to_form_params(attribute, namespace = nil) # :nodoc:
def to_form_params(attribute, namespace = nil)
attribute = if attribute.respond_to?(:permitted?)
unless attribute.permitted?
raise ArgumentError, "Attempting to generate a buttom from non-sanitized request parameters!" \
......
......@@ -338,7 +338,7 @@ def _layout(formats)
#
# ==== Returns
# * <tt>String</tt> - A template name
def _implied_layout_name # :nodoc:
def _implied_layout_name
controller_path
end
end
......
......@@ -29,7 +29,7 @@ def each(&block)
# This is the same logging logic as in ShowExceptions middleware.
# TODO Once "exceptron" is in, refactor this piece to simply re-use exceptron.
def log_error(exception) #:nodoc:
def log_error(exception)
logger = ActionView::Base.logger
return unless logger
......
......@@ -44,7 +44,7 @@ def determine_template(options)
# Renders the given template. A string representing the layout can be
# supplied as well.
def render_template(template, layout_name = nil, locals = nil) #:nodoc:
def render_template(template, layout_name = nil, locals = nil)
view, locals = @view, locals || {}
render_with_layout(layout_name, locals) do |layout|
......@@ -54,7 +54,7 @@ def render_template(template, layout_name = nil, locals = nil) #:nodoc:
end
end
def render_with_layout(path, locals) #:nodoc:
def render_with_layout(path, locals)
layout = path && find_layout(path, locals.keys, [formats.first])
content = yield(layout)
......
......@@ -91,7 +91,7 @@ def rendered_format
# Find and render a template based on the options given.
# :api: private
def _render_template(options) #:nodoc:
def _render_template(options)
variant = options.delete(:variant)
assigns = options.delete(:assigns)
context = view_context
......@@ -104,7 +104,7 @@ def _render_template(options) #:nodoc:
end
# Assign the rendered format to look up context.
def _process_format(format) #:nodoc:
def _process_format(format)
super
lookup_context.formats = [format.to_sym]
lookup_context.rendered_format = lookup_context.formats.first
......
......@@ -177,7 +177,7 @@ def build_path(name, prefix, partial)
# always check the cache before hitting the resolver. Otherwise,
# it always hits the resolver but if the key is present, check if the
# resolver is fresher before returning it.
def cached(key, path_info, details, locals) #:nodoc:
def cached(key, path_info, details, locals)
name, prefix, partial = path_info
locals = locals.map(&:to_s).sort!
......@@ -191,7 +191,7 @@ def cached(key, path_info, details, locals) #:nodoc:
end
# Ensures all the resolver information is set in the template.
def decorate(templates, path_info, details, locals) #:nodoc:
def decorate(templates, path_info, details, locals)
cached = nil
templates.each do |t|
t.locals = locals
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册