How can I create a form in Rails without having to use form_for and a model instance?

后端 未结 1 744
春和景丽
春和景丽 2021-02-04 05:48

First of all, I\'m a Rails newbie. I can hold my own in Ruby, but Rails is a whole different story for me. I like the development speed Rails offers me, but I can\'t seem to mak

相关标签:
1条回答
  • 2021-02-04 06:44

    Take a look at form_tag.

    <% form_tag '/posts' do %>
      <div><%= submit_tag 'Save' %></div>
    <% end %>
    
    0 讨论(0)
提交回复
热议问题