diff --git a/app/controllers/repositories_controller.rb b/app/controllers/repositories_controller.rb index 945cb26..2357547 100644 --- a/app/controllers/repositories_controller.rb +++ b/app/controllers/repositories_controller.rb @@ -110,7 +110,7 @@ class RepositoriesController < ApplicationController @cache_key = "repositories/diff/#{@repository.id}/" + Digest::MD5.hexdigest("#{@path}-#{@rev}-#{@rev_to}-#{@diff_type}") unless read_fragment(@cache_key) - @diff = @repository.diff(@path, @rev, @rev_to, type) + @diff = @repository.diff(@path, @rev, @rev_to, @diff_type) show_error and return unless @diff end end @@ -145,7 +145,7 @@ private @project = Project.find(params[:id]) @repository = @project.repository render_404 and return false unless @repository - @path = params[:path].squeeze('/') if params[:path] + @path = params[:path].join('/') unless params[:path].nil? @path ||= '' @rev = params[:rev].to_i if params[:rev] rescue ActiveRecord::RecordNotFound diff --git a/app/views/repositories/_revisions.rhtml b/app/views/repositories/_revisions.rhtml index 1cdc45a..c12488d 100644 --- a/app/views/repositories/_revisions.rhtml +++ b/app/views/repositories/_revisions.rhtml @@ -1,4 +1,4 @@ -<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project}, :method => :get) do %> +<% form_tag({:controller => 'repositories', :action => 'diff', :id => @project, :path => path}, :method => :get) do %>
# | @@ -24,6 +24,5 @@ <% end %>
---|