开发者

Writing a ruby file_field in html

<%= f.file_field :photo %>

How do I write this in html? I know that it's an input type="file" bu开发者_高级运维t how can I put in the :photo? I need to customise the field by writing it in html in rails.


f is the oject name, photo is the attribute name, so you have

id="object_photo"
name="object[photo]"

<input type="file" size="20" name="object[photo]" id="object_photo">
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜