Permalink
Browse files

Some route changes

  • Loading branch information...
1 parent 7506bac commit 56604cd37a7e84e40660468ddff850472f3700a7 @bryckbost committed Jun 11, 2012
View
4 app/controllers/plants_controller.rb
@@ -21,7 +21,7 @@ def create
@plant = current_user.plants.build(params[:plant])
if @plant.save
- redirect_to plants_path
+ redirect_to @plant
end
end
@@ -33,7 +33,7 @@ def update
@plant = current_user.plants.find(params[:id])
if @plant.update_attributes(params[:plant])
- redirect_to plants_path
+ redirect_to @plant
end
end
View
2 app/views/plants/calendar.html.erb
@@ -21,7 +21,7 @@
<div class="span9">
<h1>Your Plant Calendar</h1>
- <p>A calendar view of when plants will reach maturity and be ready for harvest.</p>
+ <p>A view of when plants will reach maturity and be ready for harvest.</p>
<div id="chart"></div>
View
2 app/views/plants/edit.html.erb
@@ -51,7 +51,7 @@
<div class="form-actions">
<%= f.submit "Update", :class => "btn btn-primary" %>
- <%= link_to 'Cancel', plants_path, :class => "btn"%>
+ <%= link_to 'Cancel', @plant, :class => "btn"%>
<%= link_to "Delete", @plant, :class => "btn btn-danger pull-right", :method => :delete %>
</div>
</fieldset>
View
5 app/views/plants/index.html.erb
@@ -3,7 +3,6 @@
<div class="span3">
<div class="well sidebar-nav">
<ul class="nav nav-list">
- <li class="active"><%= link_to "Dashboard", plants_path %></li>
<li><%= link_to "Calendar", calendar_plants_path, "data-skip-pjax" => true %></li>
<li><%= link_to 'Add a plant', new_plant_path, :class => "add-new-plant" %></li>
<li class="nav-header growing">Still Growing</li>
@@ -14,6 +13,10 @@
<% @harvested.each do |plant| %>
<li><%= link_to plant.human_name, plant%></li>
<%- end -%>
+ <li class="nav-header garner-these">Need More Info</li>
+ <% @in_progress.each do |plant| %>
+ <li><%= link_to plant.human_name, plant%></li>
+ <%- end -%>
</ul>
</div><!--/.well -->
</div><!--/span-->

0 comments on commit 56604cd

Please sign in to comment.