Permalink
Browse files

Adds new code

  • Loading branch information...
1 parent 80794cd commit f978e4ba04e76f10edc9fa4db5a9dd77793d5121 @adriancuadros adriancuadros committed May 7, 2011
@@ -4,4 +4,14 @@ def new
@project = Project.new
end
+ def create
+ @project = Project.new(params[:project])
+ @project.save
+ redirect_to @project
+ end
+
+ def show
+ @project = Project(params[:id])
+ end
+
end
@@ -1,6 +1,7 @@
<h1>Crear un nuevo proyecto</h1>
<%= form_for @project do |f| %>
+
<p>
<%= f.label :name, 'Nombre' %><br />
<%= f.text_field :name %>
@@ -19,4 +20,5 @@
<p>
<%= f.submit 'Crear proyecto' %>
</p>
+
<% end %>
@@ -0,0 +1,7 @@
+<h1>
+ <%= @project.name %>
+</h1>
+
+<p>
+ <%= @project.description %>
+</p>

0 comments on commit f978e4b

Please sign in to comment.