Skip to content

Commit

Permalink
Don't set breadcrumbs for formats that don't need them. #2.
Browse files Browse the repository at this point in the history
  • Loading branch information
David Yip committed Dec 5, 2012
1 parent 27e6301 commit cf26de4
Showing 1 changed file with 6 additions and 3 deletions.
9 changes: 6 additions & 3 deletions app/controllers/staff_controller.rb
Original file line number Diff line number Diff line change
Expand Up @@ -62,10 +62,13 @@ def users
# GET /staff/username.xml
# GET /staff/username.json
def show
add_breadcrumb "#{@staff.display_name}", staff_path(@staff) unless same_as_current_user(@staff)

respond_to do |format|
format.html { render :layout => "staff_information" }
format.html do
add_breadcrumb "#{@staff.display_name}", staff_path(@staff) unless same_as_current_user(@staff)

render :layout => "staff_information"
end

format.xml { render :xml => @staff }
format.json { render :json => @staff }
end
Expand Down

0 comments on commit cf26de4

Please sign in to comment.