Skip to content
This repository

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse code

Some route changes

  • Loading branch information...
commit 56604cd37a7e84e40660468ddff850472f3700a7 1 parent 7506bac
Brian Ryckbost authored June 10, 2012
4  app/controllers/plants_controller.rb
@@ -21,7 +21,7 @@ def create
21 21
     @plant = current_user.plants.build(params[:plant])
22 22
     
23 23
     if @plant.save
24  
-      redirect_to plants_path
  24
+      redirect_to @plant
25 25
     end
26 26
   end
27 27
   
@@ -33,7 +33,7 @@ def update
33 33
     @plant = current_user.plants.find(params[:id])
34 34
     
35 35
     if @plant.update_attributes(params[:plant])
36  
-      redirect_to plants_path
  36
+      redirect_to @plant
37 37
     end
38 38
   end
39 39
   
2  app/views/plants/calendar.html.erb
@@ -21,7 +21,7 @@
21 21
 <div class="span9">
22 22
   <h1>Your Plant Calendar</h1>
23 23
   
24  
-  <p>A calendar view of when plants will reach maturity and be ready for harvest.</p>
  24
+  <p>A view of when plants will reach maturity and be ready for harvest.</p>
25 25
 
26 26
   <div id="chart"></div>
27 27
 
2  app/views/plants/edit.html.erb
@@ -51,7 +51,7 @@
51 51
 
52 52
     <div class="form-actions">  
53 53
       <%= f.submit "Update", :class => "btn btn-primary" %>
54  
-      <%= link_to 'Cancel', plants_path, :class => "btn"%>
  54
+      <%= link_to 'Cancel', @plant, :class => "btn"%>
55 55
       <%= link_to "Delete", @plant, :class => "btn btn-danger pull-right", :method => :delete %>
56 56
     </div>
57 57
   </fieldset>
5  app/views/plants/index.html.erb
@@ -3,7 +3,6 @@
3 3
 <div class="span3">
4 4
   <div class="well sidebar-nav">
5 5
     <ul class="nav nav-list">
6  
-      <li class="active"><%= link_to "Dashboard", plants_path %></li>
7 6
       <li><%= link_to "Calendar", calendar_plants_path, "data-skip-pjax" => true %></li>
8 7
       <li><%= link_to 'Add a plant', new_plant_path, :class => "add-new-plant" %></li>
9 8
       <li class="nav-header growing">Still Growing</li>
@@ -14,6 +13,10 @@
14 13
       <% @harvested.each do |plant| %>
15 14
         <li><%= link_to plant.human_name, plant%></li>
16 15
       <%- end -%>
  16
+      <li class="nav-header garner-these">Need More Info</li>
  17
+      <% @in_progress.each do |plant| %>
  18
+        <li><%= link_to plant.human_name, plant%></li>
  19
+      <%- end -%>
17 20
     </ul>
18 21
   </div><!--/.well -->
19 22
 </div><!--/span-->

0 notes on commit 56604cd

Please sign in to comment.
Something went wrong with that request. Please try again.