Created
December 14, 2019 18:34
-
-
Save GAierken/1f663260f9b3867e758cc9e3fba1047e 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
<h1>Create New Slang</h1> | |
<%if flash[:errors]%> | |
<% flash[:errors].each do |error|%> | |
<%= error %> | |
<%end%> | |
<%end%> | |
<%= form_for @slang do |f|%> | |
<%=f.label :phrase%> | |
<%=f.text_field :phrase%> | |
<%=f.label :origin%> | |
<%=f.text_field :origin%> <br> | |
<p>Definitions:</p> | |
<ul> | |
<%= f.fields_for :definitions do |definitions_form| %> | |
<li> | |
<p> Meaning: <%= definitions_form.text_field :meaning %> </p> | |
<p> Language: <%= definitions_form.select :language, [ " ", "english", "mandarin", "german"] %> </p> | |
</li> | |
<% end %> | |
</ul> | |
<%=f.submit "Create"%> | |
<%end%> | |
<%= link_to 'Back to Slangs', slangs_path, method: "get" %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment