Created
March 25, 2015 16:13
-
-
Save sutter/8497d5830cf11085f417 to your computer and use it in GitHub Desktop.
Form
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
<%= form_for(@job.new_record? ? [current_user.company, @job] : @job, html: {class: 'pure-form pure-form-stacked '}) do |f| %> | |
<% if @job.errors.any? %> | |
<div id="error_explanation"> | |
<h2><%= pluralize(@job.errors.count, "error") %> prohibited this job from being saved:</h2> | |
<ul> | |
<% @job.errors.full_messages.each do |message| %> | |
<li><%= message %></li> | |
<% end %> | |
</ul> | |
</div> | |
<% end %> | |
<p class="field"> | |
<%= f.label :title %> | |
<%= f.text_field :title, class: 'mgn-t10 mgn-btm20' %> | |
</p> | |
<p class="field"> | |
<%= f.label :description %> | |
<%= f.text_area :description, class: 'mgn-t10 mgn-btm20' %> | |
</p> | |
<p class="field"> | |
<%= f.label :type_of_contract %> | |
<%= f.select :type_of_contract, Job.type_of_contracts %> | |
</p> | |
<p class="field"> | |
<%= f.label :job_category %> | |
<%= f.select :job_category, Job.job_categories, class: 'select mgn-t10 mgn-btm20' %> | |
</p> | |
<div class="actions"> | |
<%= f.submit 'Créer le Job', class: 'button' %> | |
</div> | |
<% end %> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
tu fais du ruby maintenant ? :)