You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
educoder/app/controllers/repositories_controller.rb

17 lines
423 B

6 years ago
class RepositoriesController < ApplicationController
before_action :git_base
def show
repo_path = Shixun.find_by_identifier(params[:identifier]).try(:repo_name)
{repo_path: repo_path, path: params[:path]}
@entries = @git.file_tree(params)
end
private
def git_base
@shixun = Shixun.find_by_identifier(params[:shixun_identifier])
@repo_namespace = @shixun.repo_path
end
end