diff options
author | Marius Mathiesen <marius.mathiesen@gmail.com> | 2009-01-28 14:10:43 +0100 |
---|---|---|
committer | Johan Sørensen <johan@johansorensen.com> | 2009-04-22 12:55:04 +0200 |
commit | 76afc7074291a346b490fb558e9fdc537e122b86 (patch) | |
tree | f7b2437e39da76277dc69d1c89c951dc8d5cd1db /app/controllers/blobs_controller.rb | |
parent | fc24cc5b61cc7545a2f9d03df7ca7b289a39660d (diff) | |
download | gitorious-mainline-outdated-76afc7074291a346b490fb558e9fdc537e122b86.zip gitorious-mainline-outdated-76afc7074291a346b490fb558e9fdc537e122b86.tar.gz gitorious-mainline-outdated-76afc7074291a346b490fb558e9fdc537e122b86.tar.bz2 |
Adding breadcrumb support for Blobs:
- Adding another class Breadcrumb::Blob
- Assigning in controllers, showing in views
Also backported the file suffix mappings and using these in tree listings
Diffstat (limited to 'app/controllers/blobs_controller.rb')
-rw-r--r-- | app/controllers/blobs_controller.rb | 1 |
1 files changed, 1 insertions, 0 deletions
diff --git a/app/controllers/blobs_controller.rb b/app/controllers/blobs_controller.rb index d8fc93c..0615c1c 100644 --- a/app/controllers/blobs_controller.rb +++ b/app/controllers/blobs_controller.rb @@ -28,6 +28,7 @@ class BlobsController < ApplicationController return end @blob = @git.tree(@commit.tree.id, ["#{params[:path].join("/")}"]).contents.first + @root = Breadcrumb::Blob.new(:paths => params[:path], :head => @git.head, :repository => @repository, :name => @blob.basename) render_not_found and return unless @blob unless @blob.respond_to?(:data) # it's a tree redirect_to project_repository_tree_path(@project, @repository, @commit.id, params[:path]) |