Last active
August 29, 2015 14:01
-
-
Save CADBOT/e631c4a95c08192627fb 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
<h2>New project</h2> | |
<%= form_for(@project) do |f| %> | |
<div class="field"> | |
<%= f.label :name %><br /> | |
<%= f.text_field :name %> | |
</div> | |
<div class="field"> | |
<%= f.label :technologies_used %><br /> | |
<%= f.text_area :technologies_used %> | |
</div> | |
<div class="actions"> | |
<%= f.submit %> | |
</div> | |
<% end %> | |
<%= link_to 'Back', projects_path %> |
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
class ProjectsController < ApplicationController | |
def index | |
@projects = Project.all | |
end | |
def new | |
@project = Project.create | |
end | |
end |
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
Rails.application.routes.draw do | |
resources :projects | |
end |
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
<h2>New project</h2> | |
<form accept-charset="UTF-8" action="/projects/2" class="edit_project" id="edit_project_2" method="post"><div style="display:none"><input name="utf8" type="hidden" value="✓" /><input name="_method" type="hidden" value="patch" /><input name="authenticity_token" type="hidden" value="Z313Tcw5crF9IKH/seZFCVdYB3BkoUPlOn3qtfo62vA=" /></div> | |
<div class="field"> | |
<label for="project_name">Name</label><br /> | |
<input id="project_name" name="project[name]" type="text" /> | |
</div> | |
<div class="field"> | |
<label for="project_technologies_used">Technologies used</label><br /> | |
<textarea id="project_technologies_used" name="project[technologies_used]"> | |
</textarea> | |
</div> | |
<div class="actions"> | |
<input name="commit" type="submit" value="Update Project" /> | |
</div> | |
</form> | |
<a href="/projects">Back</a> |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment