Skip to content

Commit

Permalink
Some route changes
Browse files Browse the repository at this point in the history
  • Loading branch information
bryckbost committed Jun 11, 2012
1 parent 7506bac commit 56604cd
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 5 deletions.
4 changes: 2 additions & 2 deletions app/controllers/plants_controller.rb
Expand Up @@ -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

Expand All @@ -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

Expand Down
2 changes: 1 addition & 1 deletion app/views/plants/calendar.html.erb
Expand Up @@ -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>

Expand Down
2 changes: 1 addition & 1 deletion app/views/plants/edit.html.erb
Expand Up @@ -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>
Expand Down
5 changes: 4 additions & 1 deletion app/views/plants/index.html.erb
Expand Up @@ -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>
Expand All @@ -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-->
Expand Down

0 comments on commit 56604cd

Please sign in to comment.