Skip to content

Commit

Permalink
Adds new code
Browse files Browse the repository at this point in the history
  • Loading branch information
adriancuadros committed May 7, 2011
1 parent cd3eb8e commit 80794cd
Show file tree
Hide file tree
Showing 5 changed files with 43 additions and 0 deletions.
7 changes: 7 additions & 0 deletions 3_rails/proyectos/app/controllers/projects_controller.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
class ProjectsController < ApplicationController

def new
@project = Project.new
end

end
2 changes: 2 additions & 0 deletions 3_rails/proyectos/app/helpers/projects_helper.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
module ProjectsHelper
end
22 changes: 22 additions & 0 deletions 3_rails/proyectos/app/views/projects/new.html.erb
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
<h1>Crear un nuevo proyecto</h1>

<%= form_for @project do |f| %>
<p>
<%= f.label :name, 'Nombre' %><br />
<%= f.text_field :name %>
</p>

<p>
<%= f.label :description, 'Descripción' %><br />
<%= f.text_area :description %>
</p>

<p>
<%= f.label :start, 'Inicio del proyecto' %><br />
<%= f.date_select :start %>
</p>

<p>
<%= f.submit 'Crear proyecto' %>
</p>
<% end %>
8 changes: 8 additions & 0 deletions 3_rails/proyectos/test/functional/projects_controller_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
require 'test_helper'

class ProjectsControllerTest < ActionController::TestCase
# Replace this with your real tests.
test "the truth" do
assert true
end
end
4 changes: 4 additions & 0 deletions 3_rails/proyectos/test/unit/helpers/projects_helper_test.rb
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
require 'test_helper'

class ProjectsHelperTest < ActionView::TestCase
end

0 comments on commit 80794cd

Please sign in to comment.