Skip to content

Commit 2dfc5f7

Browse files
author
Vincent (Wen Yu) Ge
authored
Merge pull request #496 from appwrite/fix-input-file
Fix twig templates to add InputFile imports
2 parents aab1435 + 136909a commit 2dfc5f7

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

src/SDK/Language/Ruby.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -281,7 +281,7 @@ public function getParamExample(array $param)
281281
$output .= '{}';
282282
break;
283283
case self::TYPE_FILE:
284-
$output .= "InputFile.fromPath('dir/file.png')";
284+
$output .= "InputFile.from_path('dir/file.png')";
285285
break;
286286
}
287287
}
@@ -302,7 +302,7 @@ public function getParamExample(array $param)
302302
$output .= "'{$example}'";
303303
break;
304304
case self::TYPE_FILE:
305-
$output .= "InputFile.fromPath('dir/file.png')";
305+
$output .= "InputFile.from_path('dir/file.png')";
306306
break;
307307
}
308308
}

templates/ruby/docs/example.md.twig

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,9 @@
11
require 'appwrite'
22

33
client = Appwrite::Client.new
4+
{% if method.type == "upload" %}
5+
InputFile = Appwrite::InputFile
6+
{% endif %}
47

58
client
69
.set_endpoint('https://[HOSTNAME_OR_IP]/v1') # Your API Endpoint

0 commit comments

Comments
 (0)