repo
stringlengths
5
92
file_url
stringlengths
80
287
file_path
stringlengths
5
197
content
stringlengths
0
32.8k
language
stringclasses
1 value
license
stringclasses
7 values
commit_sha
stringlengths
40
40
retrieved_at
stringdate
2026-01-04 15:37:27
2026-01-04 17:58:21
truncated
bool
2 classes
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb
actionview/lib/action_view/dependency_tracker/wildcard_resolver.rb
# frozen_string_literal: true module ActionView class DependencyTracker # :nodoc: class WildcardResolver # :nodoc: def initialize(view_paths, dependencies) @view_paths = view_paths @wildcard_dependencies, @explicit_dependencies = dependencies.partition { |dependency| dependency.e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/render_parser/prism_render_parser.rb
actionview/lib/action_view/render_parser/prism_render_parser.rb
# frozen_string_literal: true module ActionView module RenderParser class PrismRenderParser < Base # :nodoc: def render_calls queue = [Prism.parse(@code).value] templates = [] while (node = queue.shift) queue.concat(node.compact_child_nodes) next unless node.is_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/render_parser/ripper_render_parser.rb
actionview/lib/action_view/render_parser/ripper_render_parser.rb
# frozen_string_literal: true module ActionView module RenderParser class RipperRenderParser < Base # :nodoc: class Node < ::Array # :nodoc: attr_reader :type def initialize(type, arr, opts = {}) @type = type super(arr) end def children to_a ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/form_helper.rb
actionview/lib/action_view/helpers/form_helper.rb
# frozen_string_literal: true require "action_view/helpers/date_helper" require "action_view/helpers/url_helper" require "action_view/helpers/form_tag_helper" require "action_view/helpers/active_model_helper" require "action_view/model_naming" require "action_view/record_identifier" require "active_support/code_genera...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/form_options_helper.rb
actionview/lib/action_view/helpers/form_options_helper.rb
# frozen_string_literal: true require "erb" require "active_support/core_ext/string/output_safety" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/array/wrap" require "action_view/helpers/text_helper" module ActionView module Helpers # :nodoc: # = Action View Form Option...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/controller_helper.rb
actionview/lib/action_view/helpers/controller_helper.rb
# frozen_string_literal: true require "active_support/core_ext/module/attr_internal" module ActionView module Helpers # :nodoc: # = Action View Controller \Helpers # # This module keeps all methods and behavior in ActionView # that simply delegates to the controller. module ControllerHelper # :n...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/capture_helper.rb
actionview/lib/action_view/helpers/capture_helper.rb
# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView module Helpers # :nodoc: # = Action View Capture \Helpers # # \CaptureHelper exposes methods to let you extract generated markup which # can be used in other parts of a template or layout file. ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/output_safety_helper.rb
actionview/lib/action_view/helpers/output_safety_helper.rb
# frozen_string_literal: true require "active_support/core_ext/string/output_safety" module ActionView # :nodoc: module Helpers # :nodoc: # = Action View Raw Output \Helpers module OutputSafetyHelper # This method outputs without escaping a string. Since escaping tags is # now default, this can ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/url_helper.rb
actionview/lib/action_view/helpers/url_helper.rb
# frozen_string_literal: true require "active_support/core_ext/array/access" require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" require "action_view/helpers/content_exfiltration_prevention_helper" require "action_view/helpers/tag_helper" module ActionView module Helpe...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/rendering_helper.rb
actionview/lib/action_view/helpers/rendering_helper.rb
# frozen_string_literal: true # :markup: markdown module ActionView module Helpers # :nodoc: # # Action View Rendering Helpers # # Implements methods that allow rendering from a view context. In order to use # this module, all you need is to implement view_renderer that returns an # ActionView::...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/csrf_helper.rb
actionview/lib/action_view/helpers/csrf_helper.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View CSRF \Helpers module CsrfHelper # Returns meta tags "csrf-param" and "csrf-token" with the name of the cross-site # request forgery protection parameter and token, respectively. # # <head> ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/cache_helper.rb
actionview/lib/action_view/helpers/cache_helper.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View Cache \Helpers module CacheHelper class UncacheableFragmentError < StandardError; end # This helper exposes a method for caching fragments of a view # rather than an entire action or page. This techniq...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/content_exfiltration_prevention_helper.rb
actionview/lib/action_view/helpers/content_exfiltration_prevention_helper.rb
# frozen_string_literal: true module ActionView module Helpers module ContentExfiltrationPreventionHelper mattr_accessor :prepend_content_exfiltration_prevention, default: false # Close any open attributes before each form tag. This prevents attackers from # injecting partial tags that could l...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/text_helper.rb
actionview/lib/action_view/helpers/text_helper.rb
# frozen_string_literal: true require "active_support/core_ext/string/filters" require "active_support/core_ext/string/access" require "active_support/core_ext/array/extract_options" require "action_view/helpers/sanitize_helper" require "action_view/helpers/tag_helper" require "action_view/helpers/output_safety_helper...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/javascript_helper.rb
actionview/lib/action_view/helpers/javascript_helper.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View JavaScript \Helpers module JavaScriptHelper mattr_accessor :auto_include_nonce JS_ESCAPE_MAP = { "\\" => "\\\\", "</" => '<\/', "\r\n" => '\n', "\n" => '\n', ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/debug_helper.rb
actionview/lib/action_view/helpers/debug_helper.rb
# frozen_string_literal: true require "action_view/helpers/tag_helper" module ActionView module Helpers # :nodoc: # = Action View Debug \Helpers # # Provides a set of methods for making it easier to debug \Rails objects. module DebugHelper include TagHelper # Returns a YAML representati...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/asset_tag_helper.rb
actionview/lib/action_view/helpers/asset_tag_helper.rb
# frozen_string_literal: true require "active_support/core_ext/array/extract_options" require "active_support/core_ext/hash/keys" require "active_support/core_ext/object/inclusion" require "action_view/helpers/asset_url_helper" require "action_view/helpers/tag_helper" module ActionView module Helpers # :nodoc: ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/translation_helper.rb
actionview/lib/action_view/helpers/translation_helper.rb
# frozen_string_literal: true require "action_view/helpers/tag_helper" require "active_support/html_safe_translation" module ActionView module Helpers # :nodoc: # = Action View Translation \Helpers module TranslationHelper extend ActiveSupport::Concern include TagHelper # Specify whether...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tag_helper.rb
actionview/lib/action_view/helpers/tag_helper.rb
# frozen_string_literal: true require "active_support/code_generator" require "active_support/core_ext/enumerable" require "active_support/core_ext/string/output_safety" require "active_support/core_ext/string/inflections" require "action_view/helpers/capture_helper" require "action_view/helpers/output_safety_helper" ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/sanitize_helper.rb
actionview/lib/action_view/helpers/sanitize_helper.rb
# frozen_string_literal: true require "rails-html-sanitizer" module ActionView module Helpers # :nodoc: # = Action View Sanitize \Helpers # # The SanitizeHelper module provides a set of methods for scrubbing text of undesired HTML elements. # These helper methods extend Action View making them calla...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/date_helper.rb
actionview/lib/action_view/helpers/date_helper.rb
# frozen_string_literal: true require "date" require "action_view/helpers/tag_helper" require "active_support/core_ext/array/extract_options" require "active_support/core_ext/date/conversions" require "active_support/core_ext/hash/slice" require "active_support/core_ext/object/acts_like" require "active_support/core_e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/form_tag_helper.rb
actionview/lib/action_view/helpers/form_tag_helper.rb
# frozen_string_literal: true require "action_view/helpers/content_exfiltration_prevention_helper" require "action_view/helpers/url_helper" require "action_view/helpers/text_helper" require "active_support/core_ext/string/output_safety" require "active_support/core_ext/module/attribute_accessors" module ActionView ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
true
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/csp_helper.rb
actionview/lib/action_view/helpers/csp_helper.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View CSP \Helpers module CspHelper # Returns a meta tag "csp-nonce" with the per-session nonce value # for allowing inline <script> tags. # # <head> # <%= csp_meta_tag %> # </head> ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/atom_feed_helper.rb
actionview/lib/action_view/helpers/atom_feed_helper.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: # = Action View Atom Feed \Helpers module AtomFeedHelper # Adds easy defaults to writing Atom feeds with the Builder template engine (this does not work on ERB or any other # template languages). # # Full usage e...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/number_helper.rb
actionview/lib/action_view/helpers/number_helper.rb
# frozen_string_literal: true require "active_support/core_ext/hash/keys" require "active_support/core_ext/string/output_safety" require "active_support/number_helper" module ActionView module Helpers # :nodoc: # = Action View Number \Helpers # # Provides methods for converting numbers into formatted st...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/active_model_helper.rb
actionview/lib/action_view/helpers/active_model_helper.rb
# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" require "active_support/core_ext/enumerable" module ActionView module Helpers # :nodoc: module ActiveModelHelper end # = Active \Model Instance Tag \Helpers module ActiveModelInstanceTag def object ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/asset_url_helper.rb
actionview/lib/action_view/helpers/asset_url_helper.rb
# frozen_string_literal: true require "zlib" module ActionView module Helpers # :nodoc: # = Action View Asset URL \Helpers # # This module provides methods for generating asset paths and # URLs. # # image_path("rails.png") # # => "/assets/rails.png" # # image_url("rails.png...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags.rb
actionview/lib/action_view/helpers/tags.rb
# frozen_string_literal: true module ActionView module Helpers # :nodoc: module Tags # :nodoc: extend ActiveSupport::Autoload autoload :SelectRenderer eager_autoload do autoload :Base autoload :Translator autoload :CheckBox autoload :CollectionCheckBoxes ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/grouped_collection_select.rb
actionview/lib/action_view/helpers/tags/grouped_collection_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class GroupedCollectionSelect < Base # :nodoc: include SelectRenderer include FormOptionsHelper def initialize(object_name, method_name, template_object, collection, group_method, group_label_metho...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/email_field.rb
actionview/lib/action_view/helpers/tags/email_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class EmailField < TextField # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/hidden_field.rb
actionview/lib/action_view/helpers/tags/hidden_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class HiddenField < TextField # :nodoc: def render @options.reverse_merge!(autocomplete: "off") unless ActionView::Base.remove_hidden_field_autocomplete super end end end end...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/date_select.rb
actionview/lib/action_view/helpers/tags/date_select.rb
# frozen_string_literal: true require "active_support/core_ext/time/calculations" module ActionView module Helpers module Tags # :nodoc: class DateSelect < Base # :nodoc: include SelectRenderer def initialize(object_name, method_name, template_object, options, html_options) @htm...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/text_field.rb
actionview/lib/action_view/helpers/tags/text_field.rb
# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView module Helpers module Tags # :nodoc: class TextField < Base # :nodoc: include Placeholderable def render options = @options.stringify_keys options["size"] = options["maxl...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/password_field.rb
actionview/lib/action_view/helpers/tags/password_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class PasswordField < TextField # :nodoc: def render @options = { value: nil }.merge!(@options) super end end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/time_field.rb
actionview/lib/action_view/helpers/tags/time_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class TimeField < DatetimeField # :nodoc: def initialize(object_name, method_name, template_object, options = {}) @include_seconds = options.delete(:include_seconds) { true } super end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/datetime_local_field.rb
actionview/lib/action_view/helpers/tags/datetime_local_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class DatetimeLocalField < DatetimeField # :nodoc: def initialize(object_name, method_name, template_object, options = {}) @include_seconds = options.delete(:include_seconds) { true } super ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/select.rb
actionview/lib/action_view/helpers/tags/select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class Select < Base # :nodoc: include SelectRenderer include FormOptionsHelper def initialize(object_name, method_name, template_object, choices, options, html_options) @choices = block_g...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/month_field.rb
actionview/lib/action_view/helpers/tags/month_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class MonthField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-%m") end end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/placeholderable.rb
actionview/lib/action_view/helpers/tags/placeholderable.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: module Placeholderable # :nodoc: def initialize(*) super if tag_value = @options[:placeholder] placeholder = tag_value if tag_value.is_a?(String) method_and_value = tag_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/check_box.rb
actionview/lib/action_view/helpers/tags/check_box.rb
# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView module Helpers module Tags # :nodoc: class CheckBox < Base # :nodoc: include Checkable def initialize(object_name, method_name, template_object, checked_value, unchecked_value, options) ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/collection_helpers.rb
actionview/lib/action_view/helpers/tags/collection_helpers.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: module CollectionHelpers # :nodoc: class Builder # :nodoc: attr_reader :object, :text, :value def initialize(template_object, object_name, method_name, object, sanitize...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/radio_button.rb
actionview/lib/action_view/helpers/tags/radio_button.rb
# frozen_string_literal: true require "action_view/helpers/tags/checkable" module ActionView module Helpers module Tags # :nodoc: class RadioButton < Base # :nodoc: include Checkable def initialize(object_name, method_name, template_object, tag_value, options) @tag_value = tag_v...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/datetime_field.rb
actionview/lib/action_view/helpers/tags/datetime_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class DatetimeField < TextField # :nodoc: def render options = @options.stringify_keys options["value"] = datetime_value(options.fetch("value", value)) options["min"] = format_datetime...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/text_area.rb
actionview/lib/action_view/helpers/tags/text_area.rb
# frozen_string_literal: true require "action_view/helpers/tags/placeholderable" module ActionView module Helpers module Tags # :nodoc: class TextArea < Base # :nodoc: include Placeholderable def render options = @options.stringify_keys add_default_name_and_field(optio...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/number_field.rb
actionview/lib/action_view/helpers/tags/number_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class NumberField < TextField # :nodoc: def render options = @options.stringify_keys if range = options.delete("in") || options.delete("within") options.update("min" => range.min, "...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/color_field.rb
actionview/lib/action_view/helpers/tags/color_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class ColorField < TextField # :nodoc: def render options = @options.stringify_keys options["value"] ||= validate_color_string(value) @options = options super end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb
actionview/lib/action_view/helpers/tags/collection_radio_buttons.rb
# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView module Helpers module Tags # :nodoc: class CollectionRadioButtons < Base # :nodoc: include CollectionHelpers include FormOptionsHelper class RadioButtonBuilder < Builder # :nodoc:...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/translator.rb
actionview/lib/action_view/helpers/tags/translator.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class Translator # :nodoc: def initialize(object, object_name, method_and_value, scope:) @object_name = object_name.gsub(/\[(.*)_attributes\]\[\d+\]/, '.\1') @method_and_value = method_and_value...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/time_select.rb
actionview/lib/action_view/helpers/tags/time_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class TimeSelect < DateSelect # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/range_field.rb
actionview/lib/action_view/helpers/tags/range_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class RangeField < NumberField # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/base.rb
actionview/lib/action_view/helpers/tags/base.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class Base # :nodoc: include Helpers::ActiveModelInstanceTag, Helpers::TagHelper, Helpers::FormTagHelper attr_reader :object def initialize(object_name, method_name, template_object, options = {})...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/search_field.rb
actionview/lib/action_view/helpers/tags/search_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class SearchField < TextField # :nodoc: def render options = @options.stringify_keys if options["autosave"] if options["autosave"] == true options["autosave"] = reques...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/datetime_select.rb
actionview/lib/action_view/helpers/tags/datetime_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class DatetimeSelect < DateSelect # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/select_renderer.rb
actionview/lib/action_view/helpers/tags/select_renderer.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: module SelectRenderer # :nodoc: private def select_content_tag(option_tags, options, html_options) html_options = html_options.stringify_keys [:required, :multiple, :size].each do ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/file_field.rb
actionview/lib/action_view/helpers/tags/file_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class FileField < TextField # :nodoc: def render include_hidden = @options.delete(:include_hidden) if @options[:accept].is_a?(Array) @options[:accept] = @options[:accept].join(",") ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/date_field.rb
actionview/lib/action_view/helpers/tags/date_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class DateField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-%m-%d") end end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/tel_field.rb
actionview/lib/action_view/helpers/tags/tel_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class TelField < TextField # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/collection_select.rb
actionview/lib/action_view/helpers/tags/collection_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class CollectionSelect < Base # :nodoc: include SelectRenderer include FormOptionsHelper def initialize(object_name, method_name, template_object, collection, value_method, text_method, options, ht...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/checkable.rb
actionview/lib/action_view/helpers/tags/checkable.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: module Checkable # :nodoc: def input_checked?(options) if options.has_key?("checked") checked = options.delete "checked" checked == true || checked == "checked" else ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/weekday_select.rb
actionview/lib/action_view/helpers/tags/weekday_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class WeekdaySelect < Base # :nodoc: include SelectRenderer include FormOptionsHelper def initialize(object_name, method_name, template_object, options, html_options) @html_options = html...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/time_zone_select.rb
actionview/lib/action_view/helpers/tags/time_zone_select.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class TimeZoneSelect < Base # :nodoc: include SelectRenderer include FormOptionsHelper def initialize(object_name, method_name, template_object, priority_zones, options, html_options) @pr...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/week_field.rb
actionview/lib/action_view/helpers/tags/week_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class WeekField < DatetimeField # :nodoc: private def format_datetime(value) value&.strftime("%Y-W%V") end end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/label.rb
actionview/lib/action_view/helpers/tags/label.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class Label < Base # :nodoc: class LabelBuilder # :nodoc: attr_reader :object def initialize(template_object, object_name, method_name, object, tag_value) @template_object = templat...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/url_field.rb
actionview/lib/action_view/helpers/tags/url_field.rb
# frozen_string_literal: true module ActionView module Helpers module Tags # :nodoc: class UrlField < TextField # :nodoc: end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
actionview/lib/action_view/helpers/tags/collection_check_boxes.rb
# frozen_string_literal: true require "action_view/helpers/tags/collection_helpers" module ActionView module Helpers module Tags # :nodoc: class CollectionCheckBoxes < Base # :nodoc: include CollectionHelpers include FormOptionsHelper class CheckBoxBuilder < Builder # :nodoc: ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/testing/resolvers.rb
actionview/lib/action_view/testing/resolvers.rb
# frozen_string_literal: true require "action_view/template/resolver" module ActionView # :nodoc: # Use FixtureResolver in your tests to simulate the presence of files on the # file system. This is used internally by Rails' own test suite, and is # useful for testing extensions that have no way of knowing what ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/inline.rb
actionview/lib/action_view/template/inline.rb
# frozen_string_literal: true module ActionView # :nodoc: class Template # :nodoc: class Inline < Template # :nodoc: # This finalizer is needed (and exactly with a proc inside another proc) # otherwise templates leak in development. Finalizer = proc do |method_name, mod| # :nodoc: proc ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/sources.rb
actionview/lib/action_view/template/sources.rb
# frozen_string_literal: true module ActionView class Template module Sources extend ActiveSupport::Autoload eager_autoload do autoload :File end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/text.rb
actionview/lib/action_view/template/text.rb
# frozen_string_literal: true module ActionView # :nodoc: class Template # :nodoc: # = Action View Text Template class Text # :nodoc: attr_accessor :type def initialize(string) @string = string.to_s end def identifier "text template" end alias_method :in...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/renderable.rb
actionview/lib/action_view/template/renderable.rb
# frozen_string_literal: true module ActionView class Template # = Action View Renderable Template for objects that respond to #render_in class Renderable # :nodoc: def initialize(renderable) @renderable = renderable end def identifier @renderable.class.name end ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/resolver.rb
actionview/lib/action_view/template/resolver.rb
# frozen_string_literal: true require "pathname" require "active_support/core_ext/class" require "active_support/core_ext/module/attribute_accessors" require "action_view/template" require "concurrent/map" module ActionView # = Action View Resolver class Resolver class PathParser # :nodoc: ParsedPath = ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers.rb
actionview/lib/action_view/template/handlers.rb
# frozen_string_literal: true module ActionView # :nodoc: class Template # :nodoc: # = Action View Template Handlers module Handlers # :nodoc: autoload :Raw, "action_view/template/handlers/raw" autoload :ERB, "action_view/template/handlers/erb" autoload :Html, "action_view/template/handlers...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/types.rb
actionview/lib/action_view/template/types.rb
# frozen_string_literal: true require "active_support/core_ext/module/attribute_accessors" module ActionView class Template # :nodoc: # SimpleType is mostly just a stub implementation for when Action View # is used without Action Dispatch. class SimpleType # :nodoc: @symbols = [ :html, :text, :js,...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/raw_file.rb
actionview/lib/action_view/template/raw_file.rb
# frozen_string_literal: true module ActionView # :nodoc: class Template # :nodoc: # = Action View RawFile Template class RawFile # :nodoc: attr_accessor :type, :format def initialize(filename) @filename = filename.to_s extname = ::File.extname(filename).delete(".") @type...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/error.rb
actionview/lib/action_view/template/error.rb
# frozen_string_literal: true require "active_support/core_ext/enumerable" require "active_support/syntax_error_proxy" module ActionView # = Action View Errors class ActionViewError < StandardError # :nodoc: end class EncodingError < StandardError # :nodoc: end class WrongEncodingError < EncodingError #...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/html.rb
actionview/lib/action_view/template/html.rb
# frozen_string_literal: true module ActionView # :nodoc: class Template # :nodoc: # = Action View HTML Template class HTML # :nodoc: attr_reader :type def initialize(string, type) @string = string.to_s @type = type end def identifier "html template" ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/sources/file.rb
actionview/lib/action_view/template/sources/file.rb
# frozen_string_literal: true module ActionView class Template module Sources class File def initialize(filename) @filename = filename end def to_s ::File.binread @filename end end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers/raw.rb
actionview/lib/action_view/template/handlers/raw.rb
# frozen_string_literal: true module ActionView module Template::Handlers class Raw def call(template, source) "#{source.inspect}.html_safe;" end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers/erb.rb
actionview/lib/action_view/template/handlers/erb.rb
# frozen_string_literal: true require "strscan" require "active_support/core_ext/erb/util" module ActionView class Template module Handlers class ERB autoload :Erubi, "action_view/template/handlers/erb/erubi" # Specify trim mode for the ERB compiler. Defaults to '-'. # See ERB doc...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers/builder.rb
actionview/lib/action_view/template/handlers/builder.rb
# frozen_string_literal: true module ActionView module Template::Handlers class Builder class_attribute :default_format, default: :xml def call(template, source) require_engine # the double assignment is to silence "assigned but unused variable" warnings "xml = xml = ::Builde...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers/html.rb
actionview/lib/action_view/template/handlers/html.rb
# frozen_string_literal: true module ActionView module Template::Handlers class Html < Raw def call(template, source) "ActionView::OutputBuffer.new #{super}" end end end end
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/actionview/lib/action_view/template/handlers/erb/erubi.rb
actionview/lib/action_view/template/handlers/erb/erubi.rb
# frozen_string_literal: true require "erubi" module ActionView class Template module Handlers class ERB class Erubi < ::Erubi::Engine # :nodoc: all def initialize(input, properties = {}) @newline_pending = 0 # Dup properties so that we don't modify arg...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/rails_guides.rb
guides/rails_guides.rb
# frozen_string_literal: true $:.unshift __dir__ require "rails_guides/generator"
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/w3c_validator.rb
guides/w3c_validator.rb
# frozen_string_literal: true # --------------------------------------------------------------------------- # # This script validates the generated guides against the W3C Validator. # # Guides are taken from the output directory, from where all .html files are # submitted to the validator. # # This script is prepared ...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/active_record.rb
guides/bug_report_templates/active_record.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "sqlite3" end require "active_record/railtie" require "m...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/generic.rb
guides/bug_report_templates/generic.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" end require "active_support" require "active_support/core_ext/o...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/active_job.rb
guides/bug_report_templates/active_job.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" end require "active_job/railtie" require "minitest/autorun" cl...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/action_mailbox.rb
guides/bug_report_templates/action_mailbox.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "sqlite3" gem "net-smtp", github: "ruby/net-smtp", ref:...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/benchmark.rb
guides/bug_report_templates/benchmark.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "benchmark-ips" end require "active_support" require "act...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/action_view.rb
guides/bug_report_templates/action_view.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" end require "action_controller/railtie" require "action_view/ra...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/active_storage.rb
guides/bug_report_templates/active_storage.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "sqlite3" end require "active_record/railtie" require "a...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/action_controller.rb
guides/bug_report_templates/action_controller.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" end require "action_controller/railtie" require "minitest/autor...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/active_record_migrations.rb
guides/bug_report_templates/active_record_migrations.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "sqlite3" end require "active_record/railtie" require "m...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/bug_report_templates/action_mailer.rb
guides/bug_report_templates/action_mailer.rb
# frozen_string_literal: true require "bundler/inline" gemfile(true) do source "https://rubygems.org" gem "rails" # If you want to test against edge Rails replace the previous line with this: # gem "rails", github: "rails/rails", branch: "main" gem "net-smtp", github: "ruby/net-smtp", ref: "d496a829f9b99ad...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/test/bug_report_template_test.rb
guides/test/bug_report_template_test.rb
# frozen_string_literal: true require "test_helper" require "active_support/testing/stream" class BugReportTemplatesTest < ActiveSupport::TestCase include ActiveSupport::Testing::Stream templates = Dir.glob("bug_report_templates/*.rb") templates.each do |file| test "#{file} can be executed " do succe...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/test/test_helper.rb
guides/test/test_helper.rb
# frozen_string_literal: true require_relative "../../tools/strict_warnings" $LOAD_PATH.unshift File.expand_path("..", __dir__) require "rails_guides" require "minitest/autorun" Minitest.load :rails if Minitest.respond_to? :load
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/test/markdown/renderer_test.rb
guides/test/markdown/renderer_test.rb
# frozen_string_literal: true require "test_helper" class Markdown::RendererTest < ActiveSupport::TestCase def renderer RailsGuides::Markdown::Renderer.new end test "link returns an anchor tag" do assert_equal "<a href=\"http://example.com\">example</a>", renderer.link("http://example.com", nil, "examp...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/rails_guides/epub.rb
guides/rails_guides/epub.rb
#!/usr/bin/env ruby # frozen_string_literal: true require "nokogiri" require "fileutils" require "yaml" require "date" require "rails_guides/epub_packer" module Epub # :nodoc: extend self def generate(output_dir, epub_outfile) fix_file_names(output_dir) generate_meta_files(output_dir) generate_epub(...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/rails_guides/epub_packer.rb
guides/rails_guides/epub_packer.rb
#!/usr/bin/env ruby # frozen_string_literal: true require "nokogiri" require "fileutils" require "yaml" require "date" require "zip" module EpubPacker # :nodoc: extend self def pack(output_dir, epub_file_name) @output_dir = output_dir FileUtils.rm_f(epub_file_name) Zip::OutputStream.open(epub_file_...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false
rails/rails
https://github.com/rails/rails/blob/ba0d6f09e991d0621cc30f19c9d189cd21dbf76e/guides/rails_guides/helpers.rb
guides/rails_guides/helpers.rb
# frozen_string_literal: true require "yaml" module RailsGuides module Helpers def guide(name, url, options = {}, &block) link = content_tag(:a, href: url) { name } result = content_tag(:dt, link) if options[:work_in_progress] result << content_tag(:dd, "Work in progress", class: "int...
ruby
MIT
ba0d6f09e991d0621cc30f19c9d189cd21dbf76e
2026-01-04T15:37:27.222351Z
false