Skip to content

@blazetrails/actionview ​

ActionView — mirroring Rails ActionView

MeasureValue
Rails counterpartactionview v8.0.5.2
API methods matched99% (3158 of 3159)
Rails tests matched100% (14 of 14)
Ruby files ported113
Ruby files unported0
Measured atfe89b44726

Gaps by file ​

Ported files with Rails methods or tests still missing, largest gap first.

Ruby fileTypeScript fileMethods missingTests matched
assertions/selector_assertions/html_selector.rbassertions/selector-assertions/html-selector.ts1—

Missing methods ​

The Rails methods parity:api finds no TypeScript counterpart for, by Ruby file.

assertions/selector_assertions/html_selector.rb: 1 missing

context

Unported Ruby files ​

Every compared Ruby file has a TypeScript file.

Deviation receipts ​

JSDoc receipt tags in the package's source, by the receipt each carries.

TagPERMANENTCONVERGEABLEnone
@noRailsEquivalent1300
@missingRailsCall510
@missingRailsArgs700
@inventedArm8290
@inlinedFrom007
@internal00342

Permanently skipped tests ​

Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) (5)
No section cited (10)
DOM testing is HTML5 only (Rails::Dom::Testing.default_html_version) (6)
A String has no encoding tag either (5)
Templates are precompiled (Template#compile's module_eval) (10)
System testing runs on Vitest (SystemTestCase, SystemTesting::*) (1)
A module's initialize is inlined into the constructor (@inlinedFrom) (1)
Ruby pattern matching has no port (assert_pattern, deconstruct_keys) (3)
A translation lookup is synchronous; the load is an awaited step (I18n.translate) (1)

Ratified deviations ​

Each rule below is ratified in the repository's CLAUDE.md files. The first paragraph is quoted; the link opens the full section at this build's commit.

A module's initialize is inlined into the constructor (@inlinedFrom) ​

Ruby lets a module define initialize and reach the next one up the ancestor chain through super. A JS constructor has no such chain through a mixin. trails has no initialize methods: Ruby's new / initialize chain is written as JS constructors, by two rules.

CLAUDE.md →

Method visibility is compile-time only (Module#private, basic_obj_respond_to's pub) ​

Ruby's basic_obj_respond_to (vendor/ruby/v3.3.11/vm_method.c:2864-2879) takes a pub flag and hands it to method_boundp (:1788-1818), so respond_to?(:m) and respond_to?(:m, true) can answer differently for the same receiver, and Kernel#public_send (vm_eval.c:1350) raises NoMethodError "private method '…' called for …" where send dispatches. Visibility is a property of the method entry, readable at run time.

CLAUDE.md →

A String has no encoding tag either ​

str.encoding, force_encoding and String#b read or change a per-object encoding. A JS string has none, and trails adds none: the carrier that would hold it is the carrier this section rejects. ruby-compat tags a Uint8Array only. A Rails body that branches on a String's encoding ports the UTF-8 arm, and a test asserting str.encoding is permanently unportable for that assertion.

CLAUDE.md →

Ruby pattern matching has no port (assert_pattern, deconstruct_keys) ​

Ruby's case/in and rightward => pattern matching (vendor/ruby/v3.3.11/compile.c, iseq_compile_pattern_each) are syntax: a pattern binds and destructures through deconstruct / deconstruct_keys and raises NoMatchingPatternKeyError on a miss. JS has no pattern syntax, and a pattern written as data or a predicate is a new mini-language Rails readers would not recognise. trails does not port Ruby pattern matching: Minitest's assert_pattern / refute_pattern have no trails counterpart, and the deconstruct_keys members already ported (Date, GlobalID, URI::GID, ruby-compat's Hash) stay as plain methods. A Rails test whose assertions are patterns (PatternMatchingTestCases, vendor/rails/v8.0.5.2/actionview/test/template/test_case_test.rb:490-516) is parked as it.skip under a PERMANENT-SKIP: line citing this section. Ruled by the operator on 2026-10-21.

CLAUDE.md →

System testing runs on Vitest (SystemTestCase, SystemTesting::*) ​

Ratified in packages/actionpack/CLAUDE.md. The one-line rule: by operator ruling, system testing is ported onto Vitest, Vite and Playwright with no third-party browser-session library, and test code runs in a Node Vitest worker.

CLAUDE.md →

DOM testing is HTML5 only (Rails::Dom::Testing.default_html_version) ​

rails-dom-testing picks Nokogiri::HTML4 or HTML5 parser classes by default_html_version, which defaults to :html4 (vendor/rails-dom-testing/v2.3.0/lib/rails/dom/testing.rb:12,19-48). A Rails 7.1+ app sets it to :html5 through the gem's railtie (railtie.rb:7-10, railties/lib/rails/application/configuration.rb:276). @blazetrails/nokogiri is backed by parse5 and has no HTML4 parser. trails' DOM testing is HTML5 only: Testing.defaultHtmlVersion defaults to :html5, no railtie copies domTestingDefaultHtmlVersion, and the :html4 arm of chooseHtmlParser raises NotImplementedError where Rails' arm returns Nokogiri::HTML4. Ruled by the operator on 2026-10-15 (trails#8947). There is no story to add an HTML4 parser.

packages/actionpack/CLAUDE.md →

TSETracker answers what RubyTracker answers (DependencyTracker::RubyTracker) ​

Rails' RubyTracker reads a template's compiled Ruby through RenderParser (actionview/lib/action_view/render_parser/prism_render_parser.rb:6-37,84-88), and its three tests (actionview/test/template/dependency_tracker_test.rb:274-302) are run against it only. No trails handler compiles to Ruby, so there is no RubyTracker. By operator ruling (2026-10-18), TSETracker answers those three tests, and only those, instead: a <%# comment is not searched for render, a keyword-hash render call whose options fail render_call_options is skipped, and a String spacerTemplate: is a dependency ahead of the partial.

packages/actionview/CLAUDE.md →

Templates are precompiled (Template#compile's module_eval) ​

Rails compiles a template at its first render: compiled_source (vendor/rails/v8.0.5.2/actionview/lib/action_view/template.rb:449-492) wraps the handler's Ruby in a def, and compile (:500-539) hands it to mod.module_eval(compiled_source, identifier, offset). JS can only evaluate source text through eval, new Function or vm, each of which runs code that was never type-checked, and a with scope chain is sloppy-mode only, so it cannot appear in an ES module. By operator ruling (2026-10-19, 2026-10-20), file-backed .tse templates are precompiled in every environment, and shipped code has no eval pipeline. The split is:

packages/actionview/CLAUDE.md →

A translation lookup is synchronous; the load is an awaited step (I18n.translate) ​

I18n.translate (vendor/i18n/v1.14.8/lib/i18n.rb:212-226) is a synchronous hash walk over a loaded translation table, and Backend::Simple#lookup lazily loads that table inside the lookup — init_translations unless initialized? (vendor/i18n/v1.14.8/lib/i18n/backend/simple.rb:93-94). The load is I/O; the walk is not. trails puts the asynchrony at the load and nowhere else:

packages/i18n/CLAUDE.md →

Source ​

packages/actionview on GitHub →