-
-
Save lmiller1990/027703a2b67eeb3879c3bde1bace764d to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<% if flash.present? %> | |
<% flash[:errors].each do |msg| %> | |
<%= content_tag :div, msg %> | |
<% end %> | |
<% end %> | |
<%= form_with model: @post, local: true do |f| %> | |
<%= f.label :title %> | |
<%= f.text_field :title %> | |
<%= f.label :body %> | |
<%= f.text_area :body %> | |
<%= f.select :category_id do %> | |
<%= options_from_collection_for_select(Category.all, :id, :name) %> | |
<% end %> | |
<%= f.submit %> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment