Class: Bulb::TreeController
- Inherits:
-
BulbController
- Object
- ApplicationController
- BulbController
- Bulb::TreeController
- Defined in:
- app/controllers/bulb/tree_controller.rb
Instance Method Summary collapse
Instance Method Details
#show ⇒ Object
6 7 8 9 10 11 12 13 |
# File 'app/controllers/bulb/tree_controller.rb', line 6 def show @git_repository = @repository.git_repository tree_hash = @git_repository.head.target.tree.path(params[:path]) redirect_to repository_blob_path if tree_hash[:type] == :blob @tree = @git_repository.lookup(tree_hash[:oid]) end |