Skip to content

Commit e5d6d29

Browse files
authored
use input(type:…) instead of component
1 parent 6595e9a commit e5d6d29

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -258,9 +258,9 @@ If you want to add file upload fields to your form you will need to initialize y
258258
class User::ImageForm < ApplicationForm
259259
def template
260260
# render label
261-
render field(:image).upload.label { "Choose file" }
261+
render field(:image).input(type: "file").label { "Choose file" }
262262
# render file input with accept attribute for png and jpeg images
263-
render field(:image).upload(accept: "image/png, image/jpeg")
263+
render field(:image).input(type: "file", accept: "image/png, image/jpeg")
264264
end
265265
end
266266

0 commit comments

Comments
 (0)