Rails: How to change the text on the submit button in a Rails Form

后端 未结 10 891
你的背包
你的背包 2020-12-07 15:19

i have listed my _form.html.erb file below what i would like to do is change the text on the submit button i know how to do it in html but not shure how to do it in Rails 3<

10条回答
  •  抹茶落季
    2020-12-07 15:43

    When writing in erb

    <%= f.submit "your text" %>

    when writing in HAML

    = f.button :submit, "your text"
    

    In HAML comma should be there after submit otherwise it will throw error.

提交回复
热议问题