Skip to content

Commit 52f798a

Browse files
committed
Improve comment
1 parent c5f8043 commit 52f798a

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

lib/js_routes/route.rb

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -194,7 +194,9 @@ def apply_case(*values)
194194
sig { params(spec: SpecNode, parent_spec: T.nilable(RouteSpec)).returns(T.nilable(T.any(UntypedArray, String))) }
195195
def serialize(spec, parent_spec=nil)
196196
return nil unless spec
197-
# Rails 4 globbing requires * removal
197+
# Removing special character prefix from route variable name
198+
# * for globbing
199+
# : for common parameter
198200
return spec.tr(':*', '') if spec.is_a?(String)
199201

200202
result = serialize_spec(spec, parent_spec)

0 commit comments

Comments
 (0)