Skip to content

Instantly share code, notes, and snippets.

@raaynaldo
Last active October 31, 2020 22:30
Show Gist options
  • Save raaynaldo/ba924aba15fd24dbad8f907f82e67514 to your computer and use it in GitHub Desktop.
Save raaynaldo/ba924aba15fd24dbad8f907f82e67514 to your computer and use it in GitHub Desktop.
All about rails

form_for

params.require(:classname).permit(:field1, :field2)
<%= form_for @school_class do |f| %>
    <%= f.text_field :title %>
    <%= f.number_field :room_number %>
<% end %>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment