Skip to content

Commit

Permalink
Added Internships to the Dashboard
Browse files Browse the repository at this point in the history
Now the dashboard shows the most recent 10 updated internships.
  • Loading branch information
kcalmes committed Mar 23, 2012
1 parent c6d4ce9 commit ffe3ca8
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 1 deletion.
2 changes: 2 additions & 0 deletions app/controllers/pages_controller.rb
Expand Up @@ -4,6 +4,8 @@ def index
#authorize! :read, :page
#authorize! :index, :pages
#authorize! 'index'.to_sym, 'pages'.to_sym
@most_recent_short_term_goal_edits = @current_user.short_term_goals.order(:updated_at).limit(10)
@most_recent_internship_edits = @current_user.internships.order(:updated_at).limit(10)
end

def myguide
Expand Down
18 changes: 17 additions & 1 deletion app/views/pages/index.html.erb
Expand Up @@ -79,5 +79,21 @@
</button>
<% end %>
<% end %>

</div>
<hr>
<%= theme_box(8, "Most Recent Short Term Goal Updates") do %>
<ul>
<% @most_recent_short_term_goal_edits.each do |goal| %>
<li><%= link_to goal.name, edit_short_term_goal_path(goal) %></li>
<% end %>
</ul>
<% end %>
</div>
<%= theme_box(8, "Most Recent Internship Updates") do %>
<ul>
<% @most_recent_internship_edits.each do |internship| %>
<li><%= link_to internship.name, edit_internship_path(internship) %></li>
<% end %>
</ul>
<% end %>

0 comments on commit ffe3ca8

Please sign in to comment.