Skip to content

Commit 4dff920

Browse files
committed
actionview: Add Symbol type to Render
1 parent 10d80b1 commit 4dff920

File tree

5 files changed

+30
-1
lines changed

5 files changed

+30
-1
lines changed

.ruby-version

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
3.4.3
Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
class Test
2+
class ApplicationController < ActionController::Base
3+
end
4+
5+
class UsersController < ApplicationController
6+
def create
7+
render :new, status: :unprocessable_entity
8+
end
9+
10+
def update
11+
render "edit", status: :unprocessable_entity
12+
end
13+
end
14+
end
Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
class Test
2+
class ApplicationController < ActionController::Base
3+
end
4+
5+
class UsersController < ApplicationController
6+
include ActionView::Helpers
7+
8+
def create: () -> void
9+
10+
def update: () -> void
11+
end
12+
end
Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,2 @@
1+
additional_gems:
2+
- actionpack

gems/actionview/6.0/actionview.rbs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1114,7 +1114,7 @@ module ActionView
11141114
#
11151115
# If no options hash is passed or :update specified, the default is to render a partial and use the second parameter
11161116
# as the locals hash.
1117-
def render: (?String | ::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] locals) ?{ () -> untyped } -> String
1117+
def render: (?(String | Symbol) | ::Hash[untyped, untyped] options, ?::Hash[untyped, untyped] locals) ?{ () -> untyped } -> String
11181118
end
11191119
end
11201120
end

0 commit comments

Comments
 (0)