rails_api_doc 0.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (110) hide show
  1. data/MIT-LICENSE +20 -0
  2. data/README.rdoc +3 -0
  3. data/Rakefile +40 -0
  4. data/app/assets/javascripts/rails_api_doc/01 - Singh Saab The Great - DownloadMing.SE.mp3 +0 -0
  5. data/app/assets/javascripts/rails_api_doc/apis.js +16 -0
  6. data/app/assets/javascripts/rails_api_doc/application.js +15 -0
  7. data/app/assets/javascripts/rails_api_doc/jquery-1.3.2.js +19 -0
  8. data/app/assets/javascripts/rails_api_doc/parameters.js +2 -0
  9. data/app/assets/javascripts/rails_api_doc/projects.js +2 -0
  10. data/app/assets/stylesheets/rails_api_doc/apis.css +4 -0
  11. data/app/assets/stylesheets/rails_api_doc/application.css +8381 -0
  12. data/app/assets/stylesheets/rails_api_doc/parameters.css +4 -0
  13. data/app/assets/stylesheets/rails_api_doc/projects.css +4 -0
  14. data/app/assets/stylesheets/scaffold.css +56 -0
  15. data/app/controllers/rails_api_doc/apis_controller.rb +149 -0
  16. data/app/controllers/rails_api_doc/application_controller.rb +4 -0
  17. data/app/controllers/rails_api_doc/parameters_controller.rb +87 -0
  18. data/app/controllers/rails_api_doc/projects_controller.rb +87 -0
  19. data/app/helpers/rails_api_doc/apis_helper.rb +29 -0
  20. data/app/helpers/rails_api_doc/application_helper.rb +4 -0
  21. data/app/helpers/rails_api_doc/parameters_helper.rb +4 -0
  22. data/app/helpers/rails_api_doc/projects_helper.rb +4 -0
  23. data/app/models/rails_api_doc/api.rb +14 -0
  24. data/app/models/rails_api_doc/failure_response.rb +8 -0
  25. data/app/models/rails_api_doc/parameter.rb +7 -0
  26. data/app/models/rails_api_doc/project.rb +7 -0
  27. data/app/models/rails_api_doc/success_response.rb +8 -0
  28. data/app/views/layouts/rails_api_doc/application.html.erb +14 -0
  29. data/app/views/rails_api_doc/apis/_failure_response_fields.html.erb +10 -0
  30. data/app/views/rails_api_doc/apis/_form.html.erb +66 -0
  31. data/app/views/rails_api_doc/apis/_parameter_fields.html.erb +17 -0
  32. data/app/views/rails_api_doc/apis/_success_response_fields.html.erb +10 -0
  33. data/app/views/rails_api_doc/apis/edit.html.erb +6 -0
  34. data/app/views/rails_api_doc/apis/index.html.erb +21 -0
  35. data/app/views/rails_api_doc/apis/new.html.erb +5 -0
  36. data/app/views/rails_api_doc/apis/show.html.erb +31 -0
  37. data/app/views/rails_api_doc/parameters/_form.html.erb +33 -0
  38. data/app/views/rails_api_doc/parameters/edit.html.erb +6 -0
  39. data/app/views/rails_api_doc/parameters/index.html.erb +29 -0
  40. data/app/views/rails_api_doc/parameters/new.html.erb +5 -0
  41. data/app/views/rails_api_doc/parameters/show.html.erb +25 -0
  42. data/app/views/rails_api_doc/projects/_form.html.erb +25 -0
  43. data/app/views/rails_api_doc/projects/edit.html.erb +6 -0
  44. data/app/views/rails_api_doc/projects/index.html.erb +24 -0
  45. data/app/views/rails_api_doc/projects/new.html.erb +5 -0
  46. data/app/views/rails_api_doc/projects/show.html.erb +15 -0
  47. data/config/routes.rb +14 -0
  48. data/db/migrate/20131026073600_create_rails_api_doc_apis.rb +13 -0
  49. data/db/migrate/20131026083511_create_rails_api_doc_parameters.rb +12 -0
  50. data/db/migrate/20131110085503_create_rails_api_doc_success_responses.rb +10 -0
  51. data/db/migrate/20131117141240_add_column_note_to_rails_api_doc_success_response.rb +5 -0
  52. data/db/migrate/20131117144700_create_rails_api_doc_failure_responses.rb +11 -0
  53. data/db/migrate/20131228045156_create_rails_api_doc_projects.rb +10 -0
  54. data/db/migrate/20131228051342_add_column_project_id_to_rails_api_doc_api.rb +5 -0
  55. data/lib/rails_api_doc.rb +4 -0
  56. data/lib/rails_api_doc/engine.rb +6 -0
  57. data/lib/rails_api_doc/version.rb +3 -0
  58. data/lib/tasks/rails_api_doc_tasks.rake +4 -0
  59. data/test/dummy/README.rdoc +261 -0
  60. data/test/dummy/Rakefile +7 -0
  61. data/test/dummy/app/assets/javascripts/application.js +15 -0
  62. data/test/dummy/app/assets/stylesheets/application.css +13 -0
  63. data/test/dummy/app/controllers/application_controller.rb +3 -0
  64. data/test/dummy/app/helpers/application_helper.rb +2 -0
  65. data/test/dummy/app/views/layouts/application.html.erb +14 -0
  66. data/test/dummy/config.ru +4 -0
  67. data/test/dummy/config/application.rb +59 -0
  68. data/test/dummy/config/boot.rb +10 -0
  69. data/test/dummy/config/database.yml +25 -0
  70. data/test/dummy/config/environment.rb +5 -0
  71. data/test/dummy/config/environments/development.rb +37 -0
  72. data/test/dummy/config/environments/production.rb +67 -0
  73. data/test/dummy/config/environments/test.rb +37 -0
  74. data/test/dummy/config/initializers/backtrace_silencers.rb +7 -0
  75. data/test/dummy/config/initializers/inflections.rb +15 -0
  76. data/test/dummy/config/initializers/mime_types.rb +5 -0
  77. data/test/dummy/config/initializers/secret_token.rb +7 -0
  78. data/test/dummy/config/initializers/session_store.rb +8 -0
  79. data/test/dummy/config/initializers/wrap_parameters.rb +14 -0
  80. data/test/dummy/config/locales/en.yml +5 -0
  81. data/test/dummy/config/routes.rb +4 -0
  82. data/test/dummy/db/development.sqlite3 +0 -0
  83. data/test/dummy/db/schema.rb +16 -0
  84. data/test/dummy/db/test.sqlite3 +0 -0
  85. data/test/dummy/log/development.log +8 -0
  86. data/test/dummy/public/404.html +26 -0
  87. data/test/dummy/public/422.html +26 -0
  88. data/test/dummy/public/500.html +25 -0
  89. data/test/dummy/public/favicon.ico +0 -0
  90. data/test/dummy/script/rails +6 -0
  91. data/test/fixtures/rails_api_doc/apis.yml +15 -0
  92. data/test/fixtures/rails_api_doc/failure_responses.yml +11 -0
  93. data/test/fixtures/rails_api_doc/parameters.yml +13 -0
  94. data/test/fixtures/rails_api_doc/projects.yml +9 -0
  95. data/test/fixtures/rails_api_doc/success_responses.yml +9 -0
  96. data/test/functional/rails_api_doc/apis_controller_test.rb +51 -0
  97. data/test/functional/rails_api_doc/parameters_controller_test.rb +51 -0
  98. data/test/functional/rails_api_doc/projects_controller_test.rb +51 -0
  99. data/test/integration/navigation_test.rb +10 -0
  100. data/test/rails_api_doc_test.rb +7 -0
  101. data/test/test_helper.rb +15 -0
  102. data/test/unit/helpers/rails_api_doc/apis_helper_test.rb +6 -0
  103. data/test/unit/helpers/rails_api_doc/parameters_helper_test.rb +6 -0
  104. data/test/unit/helpers/rails_api_doc/projects_helper_test.rb +6 -0
  105. data/test/unit/rails_api_doc/api_test.rb +9 -0
  106. data/test/unit/rails_api_doc/failure_response_test.rb +9 -0
  107. data/test/unit/rails_api_doc/parameter_test.rb +9 -0
  108. data/test/unit/rails_api_doc/project_test.rb +9 -0
  109. data/test/unit/rails_api_doc/success_response_test.rb +9 -0
  110. metadata +239 -0
@@ -0,0 +1,14 @@
1
+ module RailsApiDoc
2
+ class Api < ActiveRecord::Base
3
+ attr_accessible :api_group, :name, :request_type, :url, :version, :parameters_attributes,
4
+ :success_responses_attributes, :failure_responses_attributes, :project_id
5
+ has_many :parameters, :class_name => "RailsApiDoc::Parameter", dependent: :destroy
6
+ has_many :success_responses, :class_name => "RailsApiDoc::SuccessResponse", dependent: :destroy
7
+ has_many :failure_responses, :class_name => "RailsApiDoc::FailureResponse", dependent: :destroy
8
+ belongs_to :project
9
+ accepts_nested_attributes_for :parameters, :allow_destroy => true, :reject_if => :all_blank
10
+ accepts_nested_attributes_for :success_responses, :allow_destroy => true, :reject_if => :all_blank
11
+ accepts_nested_attributes_for :failure_responses, :allow_destroy => true, :reject_if => :all_blank
12
+ DEFAULT_PAGE_SIZE = 10
13
+ end
14
+ end
@@ -0,0 +1,8 @@
1
+ module RailsApiDoc
2
+ class FailureResponse < ActiveRecord::Base
3
+ attr_accessible :api_id, :failure_structure, :note
4
+ belongs_to :api
5
+ validates_presence_of :failure_structure
6
+ validates_presence_of :note
7
+ end
8
+ end
@@ -0,0 +1,7 @@
1
+ module RailsApiDoc
2
+ class Parameter < ActiveRecord::Base
3
+ attr_accessible :api_id, :name, :note, :param_type
4
+ belongs_to :api
5
+ validates_presence_of :name, :param_type
6
+ end
7
+ end
@@ -0,0 +1,7 @@
1
+ module RailsApiDoc
2
+ class Project < ActiveRecord::Base
3
+ attr_accessible :description, :name
4
+ has_many :apis, :dependent => :destroy
5
+ validates_presence_of :name
6
+ end
7
+ end
@@ -0,0 +1,8 @@
1
+ module RailsApiDoc
2
+ class SuccessResponse < ActiveRecord::Base
3
+ attr_accessible :api_id, :success_structure, :note
4
+ belongs_to :api
5
+ validates_presence_of :success_structure
6
+ validates_presence_of :note
7
+ end
8
+ end
@@ -0,0 +1,14 @@
1
+ <!DOCTYPE html>
2
+ <html>
3
+ <head>
4
+ <title>RailsApiDoc</title>
5
+ <%= stylesheet_link_tag "rails_api_doc/application", :media => "all" %>
6
+ <%= javascript_include_tag "rails_api_doc/application" %>
7
+ <%= csrf_meta_tags %>
8
+ </head>
9
+ <body>
10
+
11
+ <%= yield %>
12
+
13
+ </body>
14
+ </html>
@@ -0,0 +1,10 @@
1
+ <div>
2
+ <div class="failure-field">
3
+ <%= f.label :failure_note %><br />
4
+ <%= f.text_field :note %>
5
+ </div>
6
+ <div class="failure-field">
7
+ <%= f.label :failure_response_structure %><br />
8
+ <%= f.text_area :failure_structure %>
9
+ </div>
10
+ </div>
@@ -0,0 +1,66 @@
1
+ <script src="http://code.jquery.com/jquery-latest.min.js"></script>
2
+
3
+ <%= form_for [@project, @api] do |f| %>
4
+ <% if @api.errors.any? %>
5
+ <div id="error_explanation">
6
+ <h2><%= pluralize(@api.errors.count, "error") %> prohibited this api from being saved:</h2>
7
+
8
+ <ul>
9
+ <% @api.errors.full_messages.each do |msg| %>
10
+ <li><%= msg %></li>
11
+ <% end %>
12
+ </ul>
13
+ </div>
14
+ <% end %>
15
+ <div class="form-fields">
16
+ <div class="field">
17
+ <%= f.label :name %><br />
18
+ <%= f.text_field :name, :required => "true" %>
19
+ </div>
20
+ <div class="field">
21
+ <%= f.label :url %><br />
22
+ <%= f.text_field :url, :required => "true" %>
23
+ </div>
24
+ <div class="field">
25
+ <%= f.label :version %><br />
26
+ <%= f.text_field :version, :required => "true" %>
27
+ </div>
28
+ <div class="field">
29
+ <%= f.label :request_type %><br />
30
+ <%= f.text_field :request_type, :required => "true" %>
31
+ </div>
32
+ <div class="field">
33
+ <%= f.label :api_group %><br />
34
+ <%= f.text_field :api_group, :required => "true" %>
35
+ </div>
36
+ </div>
37
+ <div class="clear"></div>
38
+ <h1>Parameters</h1>
39
+ <div class="nested-fields">
40
+ <%= f.fields_for :parameters do |ff| %>
41
+ <%= render "parameter_fields", :f => ff %>
42
+ <% end %>
43
+ </div>
44
+ <div class="link-to-add-more"><%= link_to_add_fields "Add More Parameters", f, :parameters %></div>
45
+ <div class="clear"></div>
46
+ <h1>Success Response</h1>
47
+ <div class="success-fields">
48
+ <%= f.fields_for :success_responses do |ff| %>
49
+ <%= render "success_response_fields", :f => ff %>
50
+ <% end %>
51
+ </div>
52
+ <div class="link-to-add-more"><%= link_to_add_success_fields "Add More Success Response", f, :success_responses %></div>
53
+ <div class="clear"></div>
54
+ <h1>Failure Response</h1>
55
+ <div class="failure-fields">
56
+ <%= f.fields_for :failure_responses do |ff| %>
57
+ <%= render "failure_response_fields", :f => ff %>
58
+ <% end %>
59
+ </div>
60
+ <div class="link-to-add-more"><%= link_to_add_failure_fields "Add More Failure Response", f, :failure_responses %></div>
61
+ <div class="clear"></div>
62
+ <div class="actions">
63
+ <%= f.submit "Create API", :class => "btn create_api_btn" %>
64
+ </div>
65
+
66
+ <% end %>
@@ -0,0 +1,17 @@
1
+ <div>
2
+ <div class="param-field">
3
+ <%= f.label :name %><br />
4
+ <%= f.text_field :name %>
5
+ </div>
6
+
7
+ <div class="param-field">
8
+ <%= f.label :param_type %><br />
9
+ <%= f.text_field :param_type %>
10
+ </div>
11
+
12
+ <div class="param-field">
13
+ <%= f.label :description %><br />
14
+ <%= f.text_field :note %>
15
+ </div>
16
+ </div>
17
+ <br />
@@ -0,0 +1,10 @@
1
+ <div>
2
+ <div class="success-field">
3
+ <%= f.label :success_note %><br />
4
+ <%= f.text_field :note %>
5
+ </div>
6
+ <div class="success-field">
7
+ <%= f.label :success_response_structure %><br />
8
+ <%= f.text_area :success_structure %>
9
+ </div>
10
+ </div>
@@ -0,0 +1,6 @@
1
+ <h1>Editing api</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', project_api_path(@project, @api) %> |
6
+ <%= link_to 'Back', project_apis_path %>
@@ -0,0 +1,21 @@
1
+ <h3><%= flash[:notice] %></h3>
2
+ <h1>Listing apis</h1><br />
3
+ <% @apis.each do |api| %>
4
+ <h3>API Name : <%= api.name %></h3>
5
+ <pre class="prettyprint language-html prettyprinted" data-type="get" style="">
6
+ <code>
7
+ <span class="pln"><strong>URL: </strong><%= api.url %></span><br />
8
+ <span class="pln"><strong>Version: </strong><%= api.version %></span><br />
9
+ <span class="pln"><strong>Request: </strong><%= api.request_type %></span><br />
10
+ <span class="pln"><strong>API Group: </strong><%= api.api_group %></span><br />
11
+ <span class="pln link"><%= link_to 'View Details', project_api_path(@project, api) %> | <%= link_to 'Edit', edit_project_api_path(@project, api) %> | <%= link_to 'Destroy', project_api_path(@project, api), method: :delete, data: { confirm: 'Are you sure?' } %></span>
12
+ </code>
13
+ </pre>
14
+
15
+ <% end %>
16
+ <br />
17
+ <%= paginate @apis %>
18
+
19
+ <%= link_to 'New Api', new_project_api_path %>|
20
+ <%= link_to 'Generate Api Doc', project_generate_doc_path %>|
21
+ <%= link_to 'All Projects', projects_path%>
@@ -0,0 +1,5 @@
1
+ <div class="clear"></div>
2
+ <h1 style="margin-left:15px">New api</h1>
3
+ <%= render 'form' %>
4
+
5
+ |<%= link_to 'Back', project_apis_path %>
@@ -0,0 +1,31 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <br /><h3>This API is Listed under Project - "<%= @api.project.name %>"</h3><br />
4
+ <h4>API Name : <%= @api.name %></h4>
5
+ <pre class="prettyprint language-html prettyprinted" data-type="get" style="">
6
+ <code>
7
+ <span class="pln"><strong class="green">URL: </strong><%= @api.url %></span><br />
8
+ <span class="pln"><strong class="green">Version: </strong><%= @api.version %></span><br />
9
+ <span class="pln"><strong class="green">Request: </strong><%= @api.request_type %></span><br />
10
+ <span class="pln"><strong class="green">API Group: </strong><%= @api.api_group %></span><br />
11
+ <span class="pln"><strong class="big-font">Parameters: </strong></span><br />
12
+ <% @api.parameters.each do |p|%>
13
+ <span class="pln"><strong class="green">Name: </strong><%= p.name %></span><br />
14
+ <span class="pln"><strong class="green">Type: </strong><%= p.param_type%></span><br />
15
+ <span class="pln"><strong class="green">Note: </strong><%= p.note%></span><br />
16
+ <% end %>
17
+ <span class="pln"><strong class="big-font">Succes Response: </strong></span><br />
18
+ <% @api.success_responses.each do |p|%>
19
+ <span class="pln"><strong class="green">Note: </strong><%= p.note %></span><br />
20
+ <span class="pln"><strong class="green">Response: </strong></span><%= p.success_structure %><br /><br />
21
+ <% end %>
22
+ <span class="pln"><strong class="big-font">Failure Responses: </strong></span><br />
23
+ <% @api.failure_responses.each do |p|%>
24
+ <span class="pln"><strong class="green">Note: </strong><%= p.note%></span><br />
25
+ <span class="pln"><strong class="green">Type: </strong></span><%= p.failure_structure%><br /><br />
26
+ <% end %>
27
+ </code>
28
+ </pre>
29
+
30
+ <%= link_to 'Edit', edit_project_api_path(@project, @api) %> |
31
+ <%= link_to 'Back', project_apis_path(@project) %>
@@ -0,0 +1,33 @@
1
+ <%= form_for(@parameter) do |f| %>
2
+ <% if @parameter.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@parameter.errors.count, "error") %> prohibited this parameter from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @parameter.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br />
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :type %><br />
20
+ <%= f.text_field :type %>
21
+ </div>
22
+ <div class="field">
23
+ <%= f.label :note %><br />
24
+ <%= f.text_field :note %>
25
+ </div>
26
+ <div class="field">
27
+ <%= f.label :api_id %><br />
28
+ <%= f.number_field :api_id %>
29
+ </div>
30
+ <div class="actions">
31
+ <%= f.submit %>
32
+ </div>
33
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing parameter</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @parameter %> |
6
+ <%= link_to 'Back', parameters_path %>
@@ -0,0 +1,29 @@
1
+ <h1>Listing parameters</h1>
2
+
3
+ <table>
4
+ <tr>
5
+ <th>Name</th>
6
+ <th>type</th>
7
+ <th>Note</th>
8
+ <th>Api</th>
9
+ <th></th>
10
+ <th></th>
11
+ <th></th>
12
+ </tr>
13
+
14
+ <% @parameters.each do |parameter| %>
15
+ <tr>
16
+ <td><%= parameter.name %></td>
17
+ <td><%= parameter.type %></td>
18
+ <td><%= parameter.note %></td>
19
+ <td><%= parameter.api_id %></td>
20
+ <td><%= link_to 'Show', parameter %></td>
21
+ <td><%= link_to 'Edit', edit_parameter_path(parameter) %></td>
22
+ <td><%= link_to 'Destroy', parameter, method: :delete, data: { confirm: 'Are you sure?' } %></td>
23
+ </tr>
24
+ <% end %>
25
+ </table>
26
+
27
+ <br />
28
+
29
+ <%= link_to 'New Parameter', new_parameter_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New parameter</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', parameters_path %>
@@ -0,0 +1,25 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Name:</b>
5
+ <%= @parameter.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>type:</b>
10
+ <%= @parameter.type %>
11
+ </p>
12
+
13
+ <p>
14
+ <b>Note:</b>
15
+ <%= @parameter.note %>
16
+ </p>
17
+
18
+ <p>
19
+ <b>Api:</b>
20
+ <%= @parameter.api_id %>
21
+ </p>
22
+
23
+
24
+ <%= link_to 'Edit', edit_parameter_path(@parameter) %> |
25
+ <%= link_to 'Back', parameters_path %>
@@ -0,0 +1,25 @@
1
+ <%= form_for(@project) do |f| %>
2
+ <% if @project.errors.any? %>
3
+ <div id="error_explanation">
4
+ <h2><%= pluralize(@project.errors.count, "error") %> prohibited this project from being saved:</h2>
5
+
6
+ <ul>
7
+ <% @project.errors.full_messages.each do |msg| %>
8
+ <li><%= msg %></li>
9
+ <% end %>
10
+ </ul>
11
+ </div>
12
+ <% end %>
13
+
14
+ <div class="field">
15
+ <%= f.label :name %><br />
16
+ <%= f.text_field :name %>
17
+ </div>
18
+ <div class="field">
19
+ <%= f.label :description %><br />
20
+ <%= f.text_field :description %>
21
+ </div>
22
+ <div class="actions">
23
+ <%= f.submit %>
24
+ </div>
25
+ <% end %>
@@ -0,0 +1,6 @@
1
+ <h1>Editing project</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Show', @project %> |
6
+ <%= link_to 'Back', projects_path %>
@@ -0,0 +1,24 @@
1
+ <h1>All Projects</h1>
2
+ <table class="table table-striped">
3
+ <tbody>
4
+ <tr>
5
+ <th>Name</th>
6
+ <th>Description</th>
7
+ <th>Actions</th>
8
+ </tr>
9
+ <% @projects.each do |project| %>
10
+ <tr>
11
+ <td><span class="label label-success"><%= project.name %></span></td>
12
+ <td><%= project.description %></td>
13
+ <td><%= link_to 'Show', project %> | <%= link_to 'Edit', edit_project_path(project) %> |
14
+ <%= link_to 'Destroy', project, method: :delete, data: { confirm: 'Are you sure?' } %> |
15
+ <%= link_to 'All Apis', project_apis_path(project)%> |
16
+ <%= link_to 'New Api', new_project_api_path(project) %> |
17
+ <% project_name = project.name.gsub(" ", "_")%>
18
+ <%= link_to 'View Api Doc', "/assets/#{project_name}/doc/index.html", :target => "_blank" if File.directory?("app/assets/projects/#{project_name}/")%></td>
19
+ </tr>
20
+ <% end %>
21
+ </tbody>
22
+ </table>
23
+ <br />
24
+ <%= link_to 'New Project', new_project_path %>
@@ -0,0 +1,5 @@
1
+ <h1>New project</h1>
2
+
3
+ <%= render 'form' %>
4
+
5
+ <%= link_to 'Back', projects_path %>
@@ -0,0 +1,15 @@
1
+ <p id="notice"><%= notice %></p>
2
+
3
+ <p>
4
+ <b>Name:</b>
5
+ <%= @project.name %>
6
+ </p>
7
+
8
+ <p>
9
+ <b>Description:</b>
10
+ <%= @project.description %>
11
+ </p>
12
+
13
+
14
+ <%= link_to 'Edit', edit_project_path(@project) %> |
15
+ <%= link_to 'Back', projects_path %>