Ruby on Rails
This report presents the forensic synthetic code analysis of rails/rails, a Ruby project with 58,799 GitHub stars. SynthScan v2.0 examined 668,125 lines of code across 3611 source files, recording 4201 pattern matches distributed across 13 syntactic categories. The overall adjusted score of 7.0 places this repository in the Low AI signal band.
The scanner applied 160+ deterministic lexical heuristics, multi-line block detectors, abstract syntax tree depth profilers, and a cross-file Jaccard similarity matrix to construct a statistically normalised synthetic code estimate. All matches are individually weighted by severity coefficient and contextual multiplier before summation, and the resulting headline score is temporally discounted to account for the repository's development history relative to the commercial emergence of large language model coding tooling (November 2022 onward).
This chart maps the temporal evolution of the adjusted synthetic code score across successive scan runs. An upward trajectory indicates ongoing incorporation of AI-generated code or expanding LLM-assisted scaffolding; a stable or declining trajectory may reflect active human refactoring, code removal, or the adoption of stricter authorship policies. The dashed secondary line (right axis) independently tracks total raw pattern hit count, which can diverge from the normalised score when codebase size changes significantly between scans.
Classifies detected patterns by their diagnostic confidence and structural impact. CRITICAL patterns (coefficient 10) represent definitive synthetic signatures — hallucinated imports, explicit LLM attribution metadata — virtually never produced by human authors. HIGH (5) indicates strong structural tells such as cross-file repetition or cross-linguistic idioms. MEDIUM (2) covers recognisable conversational padding and AI-specific vocabulary. LOW (1) captures subtle indicators like tautological comments and generic boilerplate that require density to carry independent signal.
This horizontal bar chart decomposes the repository's raw synthetic code score by top-level directory, allowing you to pinpoint precisely which modules or components carry the highest AI authorship density. Directories with disproportionately high scores relative to their size warrant targeted manual review: concentrated AI signatures often trace back to mass-generated configuration layers, auto-ported test suites, LLM-scaffolded boilerplate classes, or entire subsystems authored under heavy copilot assistance. Use this view to prioritise your human code-review effort.
The scanner identified 4201 distinct pattern matches across 13 syntactic categories. Each entry below represents a discrete location in the source code where the engine recorded a statistically significant AI authorship indicator. Expand any category row to inspect the individual file paths, line numbers, code snippets, and the lexical context (CODE, COMMENT, or STRING) in which each match was detected.
Reading the findings table: The Severity column indicates the diagnostic confidence level (CRITICAL / HIGH / MEDIUM / LOW). The Context column identifies whether the match occurred inside executable code, an inline comment, or a string literal — comment-context matches receive a ×1.5 weight because LLMs systematically over-annotate. The ⚡ bolt icon marks clustered matches: three or more patterns within a 10-line window, each receiving an additional ×1.5 density multiplier as dense clusters constitute far stronger evidence of synthetic authorship than isolated hits.
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/test/support/rack_parsing_override.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_pack.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_dispatch.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 21 | # ApplicationController. This gives you one class to configure things such as | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 41 | # populating the `@posts` instance variable. | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 61 | # used to query for HTTP headers: | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 81 | # | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 101 | # session[:person] = Person.authenticate(user_name, password) | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 121 | # ## Responses | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 141 | # | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 161 | # Redirects are used to move from one action to another. For example, after a | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 181 | # request (a GET to the show action), and not some internal re-routing which | COMMENT |
| LOW | actionpack/lib/action_controller/base.rb | 201 | # if monkeys.nil? | COMMENT |
| LOW | actionpack/lib/action_controller/metal.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/metal.rb | 61 | Middleware.new(klass, args, list, strategy, block) | COMMENT |
| LOW | actionpack/lib/action_controller/metal.rb | 81 | # | COMMENT |
| LOW | actionpack/lib/action_controller/metal.rb | 101 | # end | COMMENT |
| LOW | actionpack/lib/action_controller/metal.rb | 161 | # :attr_reader: request | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 241 | private | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 261 | # functional tests and provide lot of helpers such as `as`, `parsed_body` for | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 281 | # # the created book's URI. | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 301 | # @controller | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 321 | # class name, you can explicitly set it with `tests`. | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 341 | # assert flash.empty? # makes sure that there's nothing in the flash | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 421 | # * `body`: The request body with a string that is appropriately encoded | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 461 | # Simulate a DELETE request with the given parameters and set/volley the | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 481 | # `nil`. | COMMENT |
| LOW | actionpack/lib/action_controller/test_case.rb | 501 | # | COMMENT |
| LOW | actionpack/lib/action_controller/api.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/api.rb | 21 | # on. This makes the entire controller stack thinner, suitable for API | COMMENT |
| LOW | actionpack/lib/action_controller/api.rb | 41 | # | COMMENT |
| LOW | actionpack/lib/action_controller/api.rb | 61 | # def create | COMMENT |
| LOW | actionpack/lib/action_controller/api.rb | 81 | # posts = Post.all | COMMENT |
| LOW | actionpack/lib/action_controller/caching.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/renderer.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/renderer.rb | 81 | COMMENT | |
| LOW | actionpack/lib/action_controller/form_builder.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/form_builder.rb | 21 | # class AdminAreaController < ApplicationController | COMMENT |
| LOW | actionpack/lib/action_controller/metal/helpers.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/metal/helpers.rb | 21 | # # config/application.rb | COMMENT |
| LOW | actionpack/lib/action_controller/metal/helpers.rb | 41 | # class EventsController < ActionController::Base | COMMENT |
| LOW | actionpack/lib/action_controller/metal/helpers.rb | 101 | COMMENT | |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 41 | ActionDispatch::HostAuthorization::Permissions.new(hosts) | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 61 | # ### Examples | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 81 | # Note that the status code must be a 3xx HTTP code, or redirection will not | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 101 | # | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 121 | # * `:raise` - Raises an UnsafeRedirectError | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 161 | self.location = _enforce_open_redirect_protection(redirect_to_location, allow_other_host: allow_other_host) | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 181 | # redirect_back_or_to({ action: "show", id: 5 }) | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 221 | when Proc | COMMENT |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 241 | # url_from("http://example.com/profile") # => "http://example.com/profile" | COMMENT |
| LOW | …b/action_controller/metal/etag_with_template_digest.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 1 | # frozen_string_literal: true | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 21 | # streaming. This is covered in more detail below, see the Streaming@Middlewares | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 41 | # example, imagine the following `dashboard` action: | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 61 | # with `:stream` won't work. | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 81 | # </html> | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 101 | # | COMMENT |
| LOW | actionpack/lib/action_controller/metal/streaming.rb | 121 | # | COMMENT |
| 2782 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/test/abstract_unit.rb | 368 | def parse_set_cookie_attributes(fields, attributes = {}) | CODE |
| LOW | actionpack/test/abstract_unit.rb | 395 | def parse_set_cookies_headers(set_cookies) | CODE |
| LOW | actionpack/test/abstract_unit.rb | 418 | def assert_set_cookie_attributes(name, attributes, header = @response.headers["Set-Cookie"]) | CODE |
| LOW | actionpack/test/abstract_unit.rb | 431 | def assert_not_set_cookie_attributes(name, attributes, header = @response.headers["Set-Cookie"]) | CODE |
| LOW | actionpack/test/abstract_unit.rb | 468 | def assert_not_set_cookie_header(expected, header = @response.headers["Set-Cookie"]) | CODE |
| LOW | actionpack/test/dispatch/test_response_test.rb | 6 | def assert_response_code_range(range, predicate) | CODE |
| LOW | actionpack/test/dispatch/system_testing/driver_test.rb | 222 | def assert_driver_capabilities(driver, expected_capabilities) | CODE |
| LOW⚡ | …ionpack/test/controller/action_pack_assertions_test.rb | 27 | def redirect_to_controller_with_symbol() redirect_to controller: :elsewhere, action: :flash_me; end | CODE |
| LOW⚡ | …ionpack/test/controller/action_pack_assertions_test.rb | 31 | def redirect_invalid_external_route() redirect_to "ht_tp://www.rubyonrails.org" end | CODE |
| LOW⚡ | …ionpack/test/controller/action_pack_assertions_test.rb | 37 | def redirect_external_protocol_relative() redirect_to "//www.rubyonrails.org"; end | CODE |
| LOW | actionpack/test/controller/redirect_test.rb | 973 | def with_path_relative_redirect(action) | CODE |
| LOW | actionpack/test/controller/redirect_test.rb | 989 | def with_action_on_open_redirect(action) | CODE |
| LOW | actionpack/test/controller/redirect_test.rb | 997 | def with_allowed_redirect_hosts(hosts:) | CODE |
| LOW⚡ | actionpack/test/controller/resources_test.rb | 1239 | def assert_simply_restful_for(controller_name, options = {}) | CODE |
| LOW⚡ | actionpack/test/controller/resources_test.rb | 1244 | def assert_singleton_restful_for(singleton_name, options = {}) | CODE |
| LOW⚡ | actionpack/test/controller/resources_test.rb | 1249 | def assert_restful_routes_for(controller_name, options = {}) | CODE |
| LOW | actionpack/test/controller/resources_test.rb | 1314 | def assert_restful_named_routes_for(controller_name, singular_name = nil, options = {}) | CODE |
| LOW | actionpack/test/controller/resources_test.rb | 1366 | def assert_singleton_routes_for(singleton_name, options = {}) | CODE |
| LOW | actionpack/test/controller/resources_test.rb | 1405 | def assert_singleton_named_routes_for(singleton_name, options = {}) | CODE |
| LOW | actionpack/test/controller/resources_test.rb | 1444 | def assert_resource_allowed_routes(controller, options, shallow_options, allowed, not_allowed, path = controller) | CODE |
| LOW | actionpack/test/controller/resources_test.rb | 1459 | def assert_singleton_resource_allowed_routes(controller, options, allowed, not_allowed, path = controller.singulariz | CODE |
| LOW | actionpack/test/controller/routing_test.rb | 861 | def setup_request_method_routes_for(method) | CODE |
| LOW | actionpack/test/controller/params_wrapper_test.rb | 8 | def with_default_wrapper_options(&block) | CODE |
| LOW | …ack/test/controller/request_forgery_protection_test.rb | 725 | def assert_cross_origin_blocked(&block) | CODE |
| LOW | …ack/test/controller/request_forgery_protection_test.rb | 729 | def assert_cross_origin_not_blocked(&block) | CODE |
| LOW | …ack/test/controller/request_forgery_protection_test.rb | 1264 | def assert_matches_session_token_on_server(form_token, method = "post") | CODE |
| LOW | …pack/test/controller/http_token_authentication_test.rb | 248 | def sample_request_without_token_key(token) | CODE |
| LOW | …pack/test/controller/http_token_authentication_test.rb | 252 | def mock_authorization_request(authorization) | CODE |
| LOW | actionpack/lib/action_controller/test_case.rb | 409 | def determine_default_controller_class(name) | CODE |
| LOW | actionpack/lib/action_controller/test_case.rb | 644 | def process_controller_response(action, cookies, xhr) | CODE |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 206 | def _compute_redirect_to_location(request, options) # :nodoc: | CODE |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 267 | def _extract_redirect_to_status(options, response_options) | CODE |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 277 | def _enforce_open_redirect_protection(location, allow_other_host:) | CODE |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 318 | def _ensure_url_is_http_header_safe(url) | CODE |
| LOW | actionpack/lib/action_controller/metal/redirecting.rb | 328 | def _handle_path_relative_redirect(url) | CODE |
| LOW | …b/action_controller/metal/etag_with_template_digest.rb | 55 | def lookup_and_digest_template(template) | CODE |
| LOW | …/action_controller/metal/request_forgery_protection.rb | 716 | def masked_authenticity_token(form_options: {}) | CODE |
| LOW | …/action_controller/metal/request_forgery_protection.rb | 779 | def compare_with_global_token(token, session = nil) # :doc: | CODE |
| LOW | …/action_controller/metal/request_forgery_protection.rb | 877 | def normalize_relative_action_path(rel_action_path) | CODE |
| LOW | …lib/action_controller/metal/content_security_policy.rb | 66 | def content_security_policy_report_only(report_only = true, **options) | CODE |
| LOW | actionpack/lib/action_controller/metal/renderers.rb | 177 | def _render_to_body_with_renderer(options) # :nodoc: | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 79 | def http_basic_authenticate_with(name:, password:, realm: nil, message: nil, content_type: nil, **options) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 86 | def http_basic_authenticate_or_request_with(name:, password:, realm: nil, message: nil, content_type: nil) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 95 | def authenticate_or_request_with_http_basic(realm = nil, message = nil, content_type = nil, &login_procedure) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 99 | def authenticate_with_http_basic(&login_procedure) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 103 | def request_http_basic_authentication(realm = "Application", message = nil, content_type = nil) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 198 | def authenticate_or_request_with_http_digest(realm = "Application", message = nil, content_type = nil, &password | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 204 | def authenticate_with_http_digest(realm = "Application", &password_procedure) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 210 | def request_http_digest_authentication(realm = "Application", message = nil, content_type = nil) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 440 | def authenticate_or_request_with_http_token(realm = "Application", message = nil, content_type = nil, &login_pro | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 448 | def authenticate_with_http_token(&login_procedure) | CODE |
| LOW⚡ | …ack/lib/action_controller/metal/http_authentication.rb | 454 | def request_http_token_authentication(realm = "Application", message = nil, content_type = nil) | CODE |
| LOW | …ack/lib/action_controller/metal/http_authentication.rb | 264 | def decode_credentials_header(request) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1208 | def new_instance_with_inherited_permitted_status(hash) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1214 | def convert_parameters_to_hashes(value, using, &block) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1230 | def convert_hashes_to_parameters(key, value) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1236 | def convert_value_to_parameters(value) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1250 | def _deep_transform_keys_in_object(object, &block) | CODE |
| LOW | …npack/lib/action_controller/metal/strong_parameters.rb | 1290 | def _deep_transform_values_in_object(object, &block) | CODE |
| LOW | actionpack/lib/action_controller/metal/rendering.rb | 225 | def _set_rendered_content_type(format) | CODE |
| 763 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | .rubocop.yml | 154 | # Defining a method with parameters needs parentheses. | COMMENT |
| MEDIUM | actionpack/lib/action_controller/test_case.rb | 56 | # Create a new test request with default `env` values. | COMMENT |
| MEDIUM | actionpack/lib/action_controller/metal/live.rb | 117 | # This class provides the ability to write an SSE (Server Sent Event) to an IO | COMMENT |
| MEDIUM | actionpack/lib/action_controller/metal/renderers.rb | 81 | # Create a csv renderer: | COMMENT |
| MEDIUM | actionpack/lib/action_controller/metal/renderers.rb | 110 | # This method is the opposite of add method. | COMMENT |
| MEDIUM | …npack/lib/action_controller/metal/strong_parameters.rb | 512 | # This method is not recommended for fetching terminal values because it does | COMMENT |
| MEDIUM | actionpack/lib/action_controller/metal/rescue.rb | 8 | # This module is responsible for providing | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/middleware/remote_ip.rb | 53 | # Create a new `RemoteIp` middleware instance. | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/middleware/stack.rb | 52 | # This class is used to instrument the execution of a single middleware. It | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/middleware/flash.rb | 272 | # This method is called automatically by filters, so you generally don't need to | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/testing/integration.rb | 220 | # This method is rarely used directly. Use RequestHelpers#get, | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/testing/test_request.rb | 16 | # Create a new test request with default `env` values. | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/http/mime_type.rb | 264 | # This method is opposite of register method. | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/route_set.rb | 320 | # Create a URL helper allowing ordered parameters to be associated with | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/inspector.rb | 106 | # This class is just used for displaying route information when someone | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 734 | # Define a route that only recognizes HTTP GET. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 758 | # Define a route that only recognizes HTTP POST. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 782 | # Define a route that only recognizes HTTP PATCH. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 806 | # Define a route that only recognizes HTTP PUT. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 830 | # Define a route that only recognizes HTTP DELETE. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 854 | # Define a route that only recognizes HTTP OPTIONS. For supported arguments, see | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 878 | # Define a route that recognizes HTTP CONNECT (and GET) requests. More | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 1171 | # This class is then used like this: | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 2243 | # Define a routing concern using a name. | COMMENT |
| MEDIUM | actionpack/lib/abstract_controller/base.rb | 57 | # Define a controller as abstract. See internal_methods for more details. | COMMENT |
| MEDIUM | actionpack/lib/abstract_controller/base.rb | 63 | # Define the abstract ivar on subclasses so that we don't get uninitialized ivar | COMMENT |
| MEDIUM | activesupport/lib/active_support/error_reporter.rb | 133 | # This method is intended for reporting violated assertions about preconditions, or similar | COMMENT |
| MEDIUM | activesupport/lib/active_support/rails.rb | 9 | # This file is loaded by every Rails component except Active Support itself, | COMMENT |
| MEDIUM | activesupport/lib/active_support/descendants_tracker.rb | 8 | # This module provides an internal implementation to track descendants | COMMENT |
| MEDIUM | activesupport/lib/active_support/tagged_logging.rb | 31 | # This method is invoked when a log event occurs. | COMMENT |
| MEDIUM | activesupport/lib/active_support/time_with_zone.rb | 221 | # This method is aliased to <tt>to_formatted_s</tt>. | COMMENT |
| MEDIUM | activesupport/lib/active_support/file_update_checker.rb | 25 | # This class is used by \Rails to reload the I18n framework whenever | COMMENT |
| MEDIUM | activesupport/lib/active_support/logger.rb | 39 | # This method is invoked when a log event occurs | COMMENT |
| MEDIUM | activesupport/lib/active_support/reloader.rb | 9 | # This class defines several callbacks: | COMMENT |
| MEDIUM | activesupport/lib/active_support/cache/entry.rb | 7 | # This class is used to represent cache entries. Cache entries have a value, an optional | COMMENT |
| MEDIUM | activesupport/lib/active_support/core_ext/array/wrap.rb | 17 | # This method is similar in purpose to `Kernel#Array`, but there are some differences: | COMMENT |
| MEDIUM | …pport/lib/active_support/core_ext/array/conversions.rb | 94 | # This method is aliased to `to_formatted_s`. | COMMENT |
| MEDIUM | …pport/lib/active_support/core_ext/module/concerning.rb | 113 | # Define a new concern and mix it in. | COMMENT |
| MEDIUM | …upport/lib/active_support/core_ext/date/conversions.rb | 19 | # This method is aliased to `to_formatted_s`. | COMMENT |
| MEDIUM | …t/lib/active_support/core_ext/date_time/conversions.rb | 12 | # This method is aliased to <tt>to_formatted_s</tt>. | COMMENT |
| MEDIUM | …upport/lib/active_support/core_ext/time/conversions.rb | 17 | # This method is aliased to <tt>to_formatted_s</tt>. | COMMENT |
| MEDIUM | …ort/lib/active_support/core_ext/numeric/conversions.rb | 14 | # This method is aliased to <tt>to_formatted_s</tt>. | COMMENT |
| MEDIUM | activesupport/lib/active_support/core_ext/object/try.rb | 49 | # This method is defined to be able to write | COMMENT |
| MEDIUM | …tivesupport/lib/active_support/core_ext/object/with.rb | 17 | # This method is a shorthand for the common begin/ensure pattern: | COMMENT |
| MEDIUM | …ort/lib/active_support/core_ext/date_and_time/zones.rb | 12 | # This method is similar to Time#localtime, except that it uses <tt>Time.zone</tt> as the local zone | COMMENT |
| MEDIUM | …pport/lib/active_support/core_ext/range/conversions.rb | 32 | # This method is aliased to <tt>to_formatted_s</tt>. | COMMENT |
| MEDIUM | activesupport/lib/active_support/core_ext/erb/util.rb | 10 | # This method is not for public consumption! Seriously! | COMMENT |
| MEDIUM | activesupport/lib/active_support/core_ext/erb/util.rb | 22 | # This method is also aliased as <tt>h</tt>. | COMMENT |
| MEDIUM | …esupport/lib/active_support/inflector/transliterate.rb | 19 | # This method is I18n aware, so you can set up custom approximations for a | COMMENT |
| MEDIUM | activesupport/lib/active_support/values/time_zone.rb | 304 | # Create a new TimeZone object with the given name and offset. The | COMMENT |
| MEDIUM | …esupport/lib/active_support/testing/constant_lookup.rb | 27 | # The following code will resolve the constant: | COMMENT |
| MEDIUM | …tivesupport/lib/active_support/notifications/fanout.rb | 54 | # This class is thread safe. All methods are reentrant. | COMMENT |
| MEDIUM | activemodel/test/cases/secure_password_test.rb | 112 | # Create a password with 73 bytes by using a 3-byte Unicode character (e.g., "あ") 24 times, followed by a 1-byte cha | COMMENT |
| MEDIUM | activemodel/lib/active_model/attribute_methods.rb | 418 | # Define a method `name` in `mod` that dispatches to `send` | COMMENT |
| MEDIUM | activemodel/lib/active_model/errors.rb | 33 | # # The following methods are needed to be minimally implemented | COMMENT |
| MEDIUM | activemodel/lib/active_model/errors.rb | 104 | # This method is aliased to <tt>objects</tt>. | COMMENT |
| MEDIUM | activemodel/lib/active_model/dirty.rb | 133 | # This method is generated for each attribute. | COMMENT |
| MEDIUM | activemodel/lib/active_model/dirty.rb | 146 | # This method is generated for each attribute. | COMMENT |
| MEDIUM | activemodel/lib/active_model/dirty.rb | 157 | # This method is generated for each attribute. | COMMENT |
| MEDIUM | activemodel/lib/active_model/dirty.rb | 168 | # This method is generated for each attribute. | COMMENT |
| 105 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/lib/action_controller/test_case.rb | 699 | raise "#{iv_name} is nil: make sure you set it in your test's setup method." | CODE |
| MEDIUM | actionpack/lib/action_controller/metal/streaming.rb | 112 | # purpose of streaming. Alternatively, you can use a helper called `provide` | COMMENT |
| MEDIUM | …ionpack/lib/action_controller/metal/instrumentation.rb | 104 | # payload, so you can add more information. | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/system_test_case.rb | 46 | # base class for system testing. This is where you can change the driver, add | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/system_test_case.rb | 81 | # `:screen_size` to change the size of the browser screen, also you can use | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing.rb | 38 | # logged in user. In this case, you can use a singular resource to map /profile | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing.rb | 59 | # Alternatively, you can add prefixes to your path without using a separate | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing.rb | 72 | # For routes that don't fit the `resources` mold, you can use the HTTP helper | COMMENT |
| LOW | …lib/action_dispatch/middleware/session/cookie_store.rb | 40 | # session. Additionally, you should take care to make sure you are not relying | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/testing/integration.rb | 415 | # By default, a single session is automatically created for you, but you can use | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/testing/integration.rb | 649 | # you've registered, you can add your own encoders with: | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/url_for.rb | 62 | # within mailers, you can use url_for. However, mailers cannot access incoming | COMMENT |
| MEDIUM | …pack/lib/action_dispatch/routing/polymorphic_routes.rb | 31 | # * `url_for`, so you can use it with a record as the argument, e.g. | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 1271 | # logged in user. In this case, you can use a singular resource to map /profile | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 1463 | # logged in user. In this case, you can use a singular resource to map /profile | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/mapper.rb | 1795 | # `config/routes` directory. In that file, you can use the normal routing DSL, | COMMENT |
| MEDIUM | actionpack/lib/action_dispatch/routing/redirection.rb | 173 | # Alternatively you can use one of the other syntaxes: | COMMENT |
| LOW | activesupport/test/core_ext/class/attribute_test.rb | 233 | # However if it's broken make sure to update ActiveSupport::Callbacks::ClassMethods#set_callbacks | COMMENT |
| MEDIUM | activesupport/lib/active_support/error_reporter.rb | 10 | # To rescue and report any unhandled error, you can use the #handle method: | COMMENT |
| MEDIUM | activesupport/lib/active_support/error_reporter.rb | 18 | # Alternatively, if you want to report the error but not swallow it, you can use #record: | COMMENT |
| MEDIUM | activesupport/lib/active_support/error_reporter.rb | 233 | # Otherwise you can use #unexpected to report an error which does accept a | COMMENT |
| MEDIUM | activesupport/lib/active_support/message_verifier.rb | 17 | # In a \Rails application, you can use +Rails.application.message_verifier+ | COMMENT |
| LOW | activesupport/lib/active_support/execution_context.rb | 40 | # However in production this should never happen, and for extra safety we make sure to | COMMENT |
| MEDIUM | activesupport/lib/active_support/event_reporter.rb | 75 | # To report an event, you can use the +notify+ method: | COMMENT |
| MEDIUM | activesupport/lib/active_support/event_reporter.rb | 195 | # To add additional context to an event, separate from the event payload, you can add | COMMENT |
| MEDIUM | …ib/active_support/testing/error_reporter_assertions.rb | 78 | # To test further details about the reported exception, you can use the return | COMMENT |
| MEDIUM | activemodel/lib/active_model/callbacks.rb | 35 | # Then in your class, you can use the +before_create+, +after_create+, and | COMMENT |
| MEDIUM | activemodel/lib/active_model/conversion.rb | 36 | # you can use the default <tt>:to_model</tt> implementation, which simply | COMMENT |
| LOW | …tivemodel/lib/active_model/validations/confirmation.rb | 61 | # +nil+. To require confirmation, make sure to add a presence check for | COMMENT |
| MEDIUM | activejob/lib/active_job/queue_adapters.rb | 58 | # For older versions you can use the queue_classic-later gem. | COMMENT |
| MEDIUM | activejob/lib/active_job/continuation.rb | 173 | # the results of one step in a later step, you can use +ActiveJob::Attributes+ to persist this state. This module is | COMMENT |
| MEDIUM | railties/lib/rails/engine.rb | 269 | # Now, you can use the <tt>my_engine</tt> helper inside your application: | COMMENT |
| MEDIUM | railties/lib/rails/engine.rb | 303 | # If you want to share just a few specific helpers you can add them to application's | COMMENT |
| MEDIUM | railties/lib/rails/engine.rb | 310 | # If you want to include all of the engine's helpers, you can use the #helpers method on an engine's | COMMENT |
| MEDIUM | railties/lib/rails/engine.rb | 326 | # To use engine's migrations in application you can use the rake task below, which copies them to | COMMENT |
| MEDIUM | railties/lib/rails/engine.rb | 342 | # In order to change engine's priority you can use +config.railties_order+ in the main application. | COMMENT |
| MEDIUM | railties/lib/rails/configuration.rb | 13 | # over the default middleware stack, so you can add, swap, or remove any | COMMENT |
| MEDIUM | actioncable/lib/action_cable/channel/base.rb | 31 | # The upside of long-lived channel instances is that you can use instance | COMMENT |
| MEDIUM | actioncable/lib/action_cable/channel/streams.rb | 56 | # example shows how you can use this to provide performance introspection in the | COMMENT |
| MEDIUM | actiontext/lib/action_text/attribute.rb | 27 | # If you wish to preload the dependent RichText model, you can use the named | COMMENT |
| LOW | actiontext/lib/action_text/attribute.rb | 50 | # make sure to also update the class names in the | COMMENT |
| LOW | …ecord/test/cases/adapters/postgresql/timestamp_test.rb | 36 | # make sure to use a non-UTC time zone | COMMENT |
| MEDIUM | activerecord/test/cases/arel/visitors/mysql_test.rb | 15 | # you can use some large number for the second parameter. | COMMENT |
| MEDIUM | activerecord/lib/active_record/base.rb | 173 | # Instead of writing <tt>Person.find_by(user_name: user_name)</tt>, you can use | COMMENT |
| MEDIUM | activerecord/lib/active_record/model_schema.rb | 51 | # If you are organizing your models within modules you can add a prefix to the models within | COMMENT |
| MEDIUM | activerecord/lib/active_record/model_schema.rb | 68 | # If you are organizing your models within modules, you can add a suffix to the models within | COMMENT |
| MEDIUM | activerecord/lib/active_record/fixtures.rb | 113 | # If the model names conflicts with a +TestCase+ methods, you can use the generic +fixture+ accessor | COMMENT |
| MEDIUM | activerecord/lib/active_record/enum.rb | 91 | # For example, you can use that when manually building SQL strings: | COMMENT |
| LOW | activerecord/lib/active_record/errors.rb | 556 | # This is a subclass of TransactionRollbackError, please make sure to check | COMMENT |
| LOW | activerecord/lib/active_record/errors.rb | 564 | # This is a subclass of TransactionRollbackError, please make sure to check | COMMENT |
| MEDIUM | activerecord/lib/active_record/migration.rb | 384 | # To generate a new migration, you can use | COMMENT |
| MEDIUM | activerecord/lib/active_record/migration.rb | 413 | # you wish to downgrade. Alternatively, you can also use the STEP option if you | COMMENT |
| MEDIUM | activerecord/lib/active_record/migration.rb | 510 | # format Active Record expects, you can use the following configuration option: | COMMENT |
| MEDIUM | activerecord/lib/active_record/timestamp.rb | 14 | # Timestamps are in UTC by default but you can use the local timezone by setting: | COMMENT |
| MEDIUM | activerecord/lib/active_record/delegated_type.rb | 140 | # So here's a simple example of that: | COMMENT |
| MEDIUM | activerecord/lib/active_record/associations.rb | 355 | # \Associations are built from <tt>Relation</tt> objects, and you can use the Relation syntax | COMMENT |
| MEDIUM | activerecord/lib/active_record/associations.rb | 362 | # Inside the <tt>-> { ... }</tt> block you can use all of the usual Relation methods. | COMMENT |
| MEDIUM | activerecord/lib/active_record/associations.rb | 470 | # If you need to share the same extensions between many associations, you can use a named | COMMENT |
| LOW | activerecord/lib/active_record/associations.rb | 1759 | # Note: Since polymorphic associations rely on storing class names in the database, make sure to update the cl | COMMENT |
| MEDIUM | activerecord/lib/active_record/statement_cache.rb | 20 | # If you want to cache the statement without the values you can use the +bind+ method of the | COMMENT |
| 53 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/lib/action_controller/test_case.rb | 497 | # user: { name: 'Gaurish Sharma', email: 'user@example.com' } | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 624 | # phone: "555-1234" | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 633 | # # => #<ActionController::Parameters {"contact"=>#<ActionController::Parameters {"phone"=>"555-1234"} permitted | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 636 | # # => #<ActionController::Parameters {"contact"=>#<ActionController::Parameters {"email"=>"none@test.com", "pho | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 646 | # phone: "555-1234" | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 650 | # phone: "555-6789" | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 664 | # phone: "555-1234" | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 668 | # phone: "555-6789" | COMMENT |
| LOW⚡ | …npack/lib/action_controller/metal/strong_parameters.rb | 673 | # # => {"person"=>{"0"=>{"email"=>"none@test.com"}, "1"=>{"phone"=>"555-6789"}}} | COMMENT |
| LOW | activesupport/test/number_helper_test.rb | 62 | assert_equal("555-1234", number_helper.number_to_phone(5551234)) | CODE |
| LOW | activesupport/test/core_ext/numeric_ext_test.rb | 168 | assert_equal("555-1234", 5551234.to_fs(:phone)) | CODE |
| LOW | activesupport/test/core_ext/numeric_ext_test.rb | 169 | assert_equal("555-1234", 5551234.to_formatted_s(:phone)) | CODE |
| LOW | activesupport/test/core_ext/hash_ext_test.rb | 755 | <TEST>Lorem Ipsum</TEST> | CODE |
| LOW | activesupport/test/core_ext/hash_ext_test.rb | 761 | "TEST" => "Lorem Ipsum" | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 14 | @reporter.notify("user.created", { id: 123, name: "John Doe" }) | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 19 | assert_event_reported("user.created", payload: { id: 123, name: "John Doe" }) do | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 20 | @reporter.notify("user.created", { id: 123, name: "John Doe" }) | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 27 | @reporter.notify("user.created", { id: 123, name: "John Doe" }) | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 35 | @reporter.notify("user.created", { id: 123, name: "John Doe" }) | CODE |
| LOW⚡ | …support/test/testing/event_reporter_assertions_test.rb | 42 | @reporter.notify("user.created", { id: 123, name: "John Doe" }) | CODE |
| LOW | …support/test/testing/event_reporter_assertions_test.rb | 101 | @reporter.notify("another.event", { id: 123, name: "John Doe" }) | CODE |
| LOW | …support/test/testing/event_reporter_assertions_test.rb | 112 | payload = { id: 123, name: "John Doe" } | CODE |
| LOW | …support/test/testing/event_reporter_assertions_test.rb | 129 | @reporter.notify("email.sent", { to: "user@example.com" }) | CODE |
| LOW | …support/test/testing/event_reporter_assertions_test.rb | 138 | @reporter.notify("email.sent", { to: "user@example.com" }) | CODE |
| LOW | activesupport/lib/active_support/number_helper.rb | 45 | # number_to_phone(5551234) # => "555-1234" | COMMENT |
| LOW | activesupport/lib/active_support/number_helper.rb | 46 | # number_to_phone("5551234") # => "555-1234" | COMMENT |
| LOW | activesupport/lib/active_support/event_reporter.rb | 107 | # Rails.event.notify(UserCreatedEvent.new(id: 123, name: "John Doe")) | COMMENT |
| LOW⚡ | …pport/lib/active_support/core_ext/module/delegation.rb | 91 | # john_doe = Person.new('John Doe', 'Vimmersvej 13') | COMMENT |
| LOW⚡ | …pport/lib/active_support/core_ext/module/delegation.rb | 93 | # invoice.client_name # => "John Doe" | COMMENT |
| LOW⚡ | …pport/lib/active_support/core_ext/module/delegation.rb | 103 | # invoice.customer_name # => 'John Doe' | COMMENT |
| LOW | …ort/lib/active_support/core_ext/numeric/conversions.rb | 23 | # 5551234.to_fs(:phone) # => "555-1234" | COMMENT |
| LOW⚡ | …ib/active_support/testing/event_reporter_assertions.rb | 129 | # payload: { id: 123, name: "John Doe" }, | COMMENT |
| LOW⚡ | …ib/active_support/testing/event_reporter_assertions.rb | 133 | # Rails.event.notify("user.created", { id: 123, name: "John Doe" }) | COMMENT |
| LOW⚡ | …ib/active_support/testing/event_reporter_assertions.rb | 140 | # Rails.event.notify("user.created", { id: 123, name: "John Doe" }) | COMMENT |
| LOW | …ib/active_support/testing/event_reporter_assertions.rb | 165 | # { name: "email.sent", payload: { to: "user@example.com" } } | COMMENT |
| LOW | railties/test/application/zeitwerk_integration_test.rb | 137 | app_file "app/serializers/money_serializer.rb", "MoneySerializer = :dummy_value" | CODE |
| LOW | railties/test/application/configuration_test.rb | 4186 | config.active_record.encryption.primary_key = "dummy_key" | CODE |
| LOW | railties/test/application/configuration_test.rb | 4193 | assert_equal "dummy_key", ActiveRecord::Encryption.config.primary_key | CODE |
| LOW | railties/test/application/configuration_test.rb | 4211 | Rails.application.config.active_record.encryption.primary_key = "dummy_key" | CODE |
| LOW | railties/test/application/configuration_test.rb | 4236 | assert_equal "dummy_key", Post.attribute_types["content"].scheme.key_provider.primary_key | CODE |
| LOW | railties/test/application/configuration_test.rb | 4252 | Rails.application.config.active_record.encryption.primary_key = "dummy_key" | CODE |
| LOW | railties/test/application/configuration_test.rb | 4272 | assert_equal "dummy_key", Post.attribute_types["content"].scheme.key_provider.primary_key | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 80 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 116 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 154 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 187 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 216 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 257 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 294 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 382 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 442 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 550 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 594 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 653 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 684 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 737 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 784 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 832 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 897 | mail to: "to@example.org" | CODE |
| LOW | railties/test/application/mailer_previews_test.rb | 942 | mail to: "to@example.org" | CODE |
| 101 more matches not shown… | ||||
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/test/abstract_unit.rb | 144 | # simply return the controller#action as Rack::Body. | COMMENT |
| MEDIUM | actionpack/lib/action_controller/metal.rb | 229 | # Basic `url_for` that can be overridden for more robust functionality. | COMMENT |
| MEDIUM | …/action_controller/metal/request_forgery_protection.rb | 730 | # Essentially the inverse of `masked_authenticity_token`. | COMMENT |
| LOW | …ionpack/lib/action_controller/metal/conditional_get.rb | 100 | # You can also just pass a record: | COMMENT |
| LOW | …ionpack/lib/action_controller/metal/conditional_get.rb | 179 | # You can also just pass a record: | COMMENT |
| LOW | actionpack/lib/action_dispatch/routing.rb | 230 | # In tests you can simply pass the URL or named route to `get` or `post`. | COMMENT |
| LOW | actionpack/lib/abstract_controller/helpers.rb | 227 | # In some tests inherited is called explicitly. In that case, just return the | COMMENT |
| MEDIUM | activesupport/test/cache/stores/mem_cache_store_test.rb | 9 | # Emulates a latency on Dalli's back-end for the key latency to facilitate | COMMENT |
| MEDIUM | …test/cache/stores/deprecated_redis_cache_store_test.rb | 8 | # Emulates a latency on Redis's back-end for the key latency to facilitate | COMMENT |
| LOW | activesupport/lib/active_support/descendants_tracker.rb | 19 | # So we can simply use WeakMap as a `Set`. | COMMENT |
| LOW | activesupport/lib/active_support/cache.rb | 373 | # just call +write+. | COMMENT |
| MEDIUM | activesupport/lib/active_support/current_attributes.rb | 17 | # facilitate easy access to the global, per-request attributes without passing them deeply | COMMENT |
| MEDIUM | activesupport/lib/active_support/cache/null_store.rb | 14 | # be cached inside blocks that utilize this strategy. See | COMMENT |
| LOW | …ivesupport/lib/active_support/inflector/inflections.rb | 215 | # regular expressions. You simply pass the irregular in singular and | COMMENT |
| LOW | railties/lib/rails/engine.rb | 234 | # URL helpers like +my_engine_articles_path+. Instead, you should simply use | COMMENT |
| LOW | railties/lib/rails/generators/named_base.rb | 137 | # Tries to retrieve the application name or simply return application. | COMMENT |
| LOW | actioncable/lib/action_cable/channel/test_case.rb | 113 | # identifiers. To do this just use: | COMMENT |
| LOW | activerecord/test/cases/invalid_connection_test.rb | 13 | # Can't just use current adapter; sqlite3 will create a database | COMMENT |
| LOW | activerecord/lib/active_record/base.rb | 42 | # And of course you can just create a bare object and specify the attributes after the fact: | COMMENT |
| MEDIUM | activerecord/lib/active_record/errors.rb | 538 | # Due to the aforementioned side-effects, this exception should not be raised | COMMENT |
| MEDIUM | activerecord/lib/active_record/nested_attributes.rb | 401 | # used in conjunction with fields_for to build a form element for the | COMMENT |
| MEDIUM | activerecord/lib/active_record/associations.rb | 1732 | # This option should not be specified when #belongs_to is used in conjunction with | COMMENT |
| MEDIUM | activerecord/lib/active_record/railtie.rb | 439 | # Conditions are written this way to be robust against custom | COMMENT |
| LOW | …erecord/lib/active_record/encryption/null_encryptor.rb | 5 | # An encryptor that won't decrypt or encrypt. It will just return the passed | COMMENT |
| LOW | …/lib/active_record/associations/through_association.rb | 55 | # situation it is more natural for the user to just create or modify their join records | COMMENT |
| MEDIUM | …tiverecord/lib/active_record/relation/query_methods.rb | 347 | # This method only works in conjunction with #includes. | COMMENT |
| LOW | …tiverecord/lib/active_record/relation/query_methods.rb | 481 | # To add multiple CTEs just pass multiple key-value pairs | COMMENT |
| MEDIUM | …tiverecord/lib/active_record/validations/uniqueness.rb | 229 | # Using this validation method in conjunction with | COMMENT |
| MEDIUM | …record/connection_adapters/abstract/connection_pool.rb | 80 | # This is the default behavior for Active Record when used in conjunction with | COMMENT |
| LOW | …ve_record/connection_adapters/postgresql/oid/vector.rb | 20 | # is to just return the string. | COMMENT |
| MEDIUM | …iverecord/lib/active_record/migration/compatibility.rb | 395 | # keys by default and MySQL uses bigint. This compat layer makes old migrations utilize | COMMENT |
| LOW | activerecord/lib/arel/nodes/node.rb | 147 | # Maybe we should just use `Table.engine`? :'( | COMMENT |
| LOW | actionview/lib/action_view/base.rb | 52 | # As you see, we use the output embeddings for the render methods. The render call itself will just return a string ho | COMMENT |
| LOW | actionview/lib/action_view/template.rb | 361 | # handles encodings, we simply pass the String as is to | COMMENT |
| LOW | actionview/lib/action_view/helpers/form_helper.rb | 430 | # If you don't want to an authenticity token field be rendered at all just pass <tt>false</tt>: | COMMENT |
| MEDIUM | actionview/lib/action_view/helpers/asset_url_helper.rb | 178 | # this is commonly used in conjunction with a CDN. | COMMENT |
| LOW | actionmailer/lib/action_mailer/base.rb | 168 | # You never instantiate your mailer class. Rather, you just call the method you defined on the class itself. | COMMENT |
| LOW | activestorage/app/models/active_storage/variant.rb | 36 | # has already been processed and uploaded to the service, and, if so, just return that. Otherwise it will perform | COMMENT |
| LOW | activestorage/app/models/active_storage/blob.rb | 18 | # If you need to create a derivative or otherwise change the blob, simply create a new blob and purge the old one. | COMMENT |
| LOW | activestorage/app/models/active_storage/blob.rb | 285 | # you should instead simply create a new blob based on the old one. | COMMENT |
| MEDIUM | activestorage/lib/active_storage/service.rb | 22 | # of the aforementioned constant under the +service+ key. For example: | COMMENT |
| MEDIUM | actionmailbox/lib/action_mailbox/test_helper.rb | 29 | # When you need to create a more intricate email, like a multi-part email | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| HIGH | actionpack/lib/action_dispatch/http/mime_negotiation.rb | 184 | # In this example, the `:iphone` format will be used if it's available, | COMMENT |
| HIGH | activesupport/lib/active_support/callbacks.rb | 841 | # In this example, if any before validate callbacks returns +false+, | COMMENT |
| HIGH | actioncable/lib/action_cable/channel/base.rb | 82 | # In this example, the subscribed and unsubscribed methods are not callable | COMMENT |
| HIGH | actioncable/lib/action_cable/channel/base.rb | 106 | # In this example, the subscription will be rejected if the `current_user` does | COMMENT |
| HIGH | actioncable/lib/action_cable/channel/streams.rb | 31 | # Based on the above example, the subscribers of this channel will get whatever | COMMENT |
| HIGH | guides/source/autoloading_and_reloading_constants.md | 583 | # In this example we define the module on the spot. Could also be created | COMMENT |
| HIGH | activerecord/lib/active_record/transactions.rb | 47 | # In this example a +balance+ record is transactionally saved even | COMMENT |
| HIGH | …tiverecord/lib/active_record/validations/uniqueness.rb | 178 | # records matching certain conditions. In this example archived articles | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| CRITICAL | activesupport/test/core_ext/numeric_ext_test.rb | 67 | assert_equal 365.2425.days.to_f.seconds.since(@now), 1.year.to_f.seconds.since(@now) | CODE |
| CRITICAL | activesupport/test/core_ext/numeric_ext_test.rb | 69 | assert_equal 365.2425.days.to_f.seconds.since(@dtnow), 1.year.to_f.seconds.since(@dtnow) | CODE |
| CRITICAL | railties/test/application/rake_test.rb | 193 | puts Rails.application.routes.named_routes.to_h.keys.join(" ") | CODE |
| CRITICAL | railties/lib/rails/application.rb | 146 | self.class.name.underscore.dasherize.delete_suffix("/application") | CODE |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | railties/test/generators/plugin_generator_test.rb | 843 | `#{destination_root}/bin/rails g scaffold article` | CODE |
| MEDIUM | railties/lib/rails/generators.rb | 115 | # so generators such as scaffold won't create them. | COMMENT |
| MEDIUM | railties/lib/rails/generators.rb | 151 | "#{test}:scaffold", | CODE |
| MEDIUM | railties/lib/rails/generators.rb | 155 | "#{template}:scaffold", | CODE |
| MEDIUM | railties/lib/rails/generators/resource_helpers.rb | 8 | # Deal with controller names on scaffold and add some helpers to deal with | COMMENT |
| MEDIUM | railties/lib/rails/generators/resource_helpers.rb | 59 | # to tell scaffold entities how to generate a specific method for the | COMMENT |
| MEDIUM | railties/lib/rails/generators/actions.rb | 327 | # generate "scaffold", "Post title:string body:text" | COMMENT |
| MEDIUM | railties/lib/rails/generators/actions.rb | 328 | # generate "scaffold", "Post", "title:string", "body:text" | COMMENT |
| MEDIUM | guides/source/3_0_release_notes.md | 55 | $ rails g scaffold post title:string # instead of script/generate scaffold post title:string | CODE |
| MEDIUM | guides/source/generators.md | 272 | [scaffold view templates]: https://github.com/rails/rails/tree/main/railties/lib/rails/generators/erb/scaffold/templates | CODE |
| MEDIUM | activerecord/test/cases/connection_pool_test.rb | 1638 | # the kernel of the whole test is here, everything else is just scaffolding, | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | actionpack/lib/abstract_controller/caching/fragments.rb | 103 | # Check if a cached fragment from the location signified by `key` exists (see | COMMENT |
| LOW | activesupport/lib/active_support/file_update_checker.rb | 63 | # Check if any of the entries were updated. If so, the watched and/or | COMMENT |
| LOW | activesupport/lib/active_support/event_reporter.rb | 433 | # Check if debug mode is currently enabled. Debug mode is enabled on the reporter | COMMENT |
| LOW | …ve_support/testing/parallelization/test_distributor.rb | 27 | # Check if there is pending work. | COMMENT |
| LOW | activejob/lib/active_job/continuation/step.rb | 33 | # Check if the job should be interrupted, and if so raise an Interrupt exception. | COMMENT |
| LOW | actioncable/lib/action_cable/server/base.rb | 153 | # Check if the request origin is allowed to connect to the Action Cable server. | COMMENT |
| LOW | actiontext/test/dummy/config/environments/production.rb | 77 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. | COMMENT |
| LOW | activerecord/test/cases/batches_test.rb | 226 | # Set back to default | COMMENT |
| LOW | activerecord/test/cases/batches_test.rb | 238 | # Set back to default | COMMENT |
| LOW | activerecord/lib/active_record/inheritance.rb | 124 | # Set this to +true+ if this is an abstract class (see | COMMENT |
| LOW | …/lib/active_record/connection_adapters/query_intent.rb | 197 | # Check if result has been populated yet (without blocking) | COMMENT |
| LOW | …e_record/connection_adapters/abstract_mysql_adapter.rb | 1060 | # Set sql_mode to false or :default in variables to skip. | COMMENT |
| LOW | …cord/connection_adapters/abstract/schema_statements.rb | 487 | # Set this to true to make this a bulk alter query, such as | COMMENT |
| LOW | …onview/lib/action_view/renderer/collection_renderer.rb | 18 | # Check if this is the first iteration of the partial. | COMMENT |
| LOW | …onview/lib/action_view/renderer/collection_renderer.rb | 23 | # Check if this is the last iteration of the partial. | COMMENT |
| LOW | actionview/lib/action_view/helpers/tag_helper.rb | 1684 | # Set escape to false to disable escaping. | COMMENT |
| LOW | …vestorage/test/dummy/config/environments/production.rb | 77 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. | COMMENT |
| LOW | …onmailbox/test/dummy/config/environments/production.rb | 77 | # Set this to true and configure the email server for immediate delivery to raise delivery errors. | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| MEDIUM | guides/w3c_validator.rb | 3 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | guides/w3c_validator.rb | 29 | # --------------------------------------------------------------------------- | COMMENT |
| MEDIUM | guides/source/rails_on_rack.md | 81 | # ------------------------------------------------------- | COMMENT |
| MEDIUM | guides/source/rails_on_rack.md | 86 | # --------------------------------------- | COMMENT |
| MEDIUM | …nnection_adapters/postgresql/explain_pretty_printer.rb | 11 | # ------------------------------------------------------------------------------ | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | …pack/lib/action_dispatch/routing/polymorphic_routes.rb | 52 | # Example usage: | COMMENT |
| LOW | activerecord/lib/active_record/schema.rb | 11 | # Usage: | COMMENT |
| LOW | activerecord/lib/active_record/connection_handling.rb | 166 | # Usage: | COMMENT |
| LOW | …ionview/lib/action_view/helpers/form_options_helper.rb | 252 | # Sample usage: | COMMENT |
| LOW | …ionview/lib/action_view/helpers/form_options_helper.rb | 459 | # Sample usage: | COMMENT |
| Severity | File | Line | Snippet | Context |
|---|---|---|---|---|
| LOW | activesupport/lib/active_support/notifications.rb | 136 | # WARNING: The instrumentation framework is designed for long-running subscribers, | COMMENT |
| LOW | activerecord/lib/active_record/store.rb | 34 | # NOTE: The default validations with the exception of +uniqueness+ will work. | COMMENT |
| LOW | …tiverecord/lib/active_record/validations/associated.rb | 35 | # WARNING: This validation must not be used on both ends of an association. | COMMENT |
| LOW | …record/lib/active_record/fixture_set/render_context.rb | 5 | # NOTE: This class has to be defined in compact style in | COMMENT |