[issue #133] Fixed redirection bugs
This commit is contained in:
parent
c26962c216
commit
4dcc39975d
14
Gemfile.lock
14
Gemfile.lock
|
@ -54,14 +54,14 @@ GEM
|
|||
activerecord (>= 2.2.2)
|
||||
arel (2.0.10)
|
||||
bcrypt-ruby (3.0.1)
|
||||
bluepill (0.0.52)
|
||||
bluepill (0.0.55)
|
||||
activesupport (>= 3.0.0)
|
||||
daemons (~> 1.1.0)
|
||||
daemons (~> 1.1.4)
|
||||
i18n (>= 0.5.0)
|
||||
state_machine (~> 1.1.0)
|
||||
builder (2.1.2)
|
||||
cancan (1.6.7)
|
||||
cape (1.2.0)
|
||||
cape (1.4.0)
|
||||
capistrano (2.9.0)
|
||||
highline
|
||||
net-scp (>= 1.0.0)
|
||||
|
@ -74,7 +74,7 @@ GEM
|
|||
chronic (0.6.7)
|
||||
cocaine (0.2.1)
|
||||
creole (0.4.2)
|
||||
daemons (1.1.6)
|
||||
daemons (1.1.8)
|
||||
delayed_job (2.1.4)
|
||||
activesupport (~> 3.0)
|
||||
daemons
|
||||
|
@ -92,7 +92,7 @@ GEM
|
|||
factory_girl_rails (1.4.0)
|
||||
factory_girl (~> 2.3.0)
|
||||
railties (>= 3.0.0)
|
||||
github-markup (0.7.0)
|
||||
github-markup (0.7.1)
|
||||
gollum (1.3.1)
|
||||
albino (~> 1.3.2)
|
||||
github-markup (>= 0.4.0, < 1.0.0)
|
||||
|
@ -152,7 +152,7 @@ GEM
|
|||
omniauth (~> 1.0)
|
||||
rack-openid (~> 1.3.1)
|
||||
orm_adapter (0.0.6)
|
||||
paperclip (2.5.2)
|
||||
paperclip (2.6.0)
|
||||
activerecord (>= 2.3.0)
|
||||
activesupport (>= 2.3.2)
|
||||
cocaine (>= 0.0.2)
|
||||
|
@ -179,7 +179,7 @@ GEM
|
|||
rails-xmlrpc (0.3.6)
|
||||
rails3-generators (0.17.4)
|
||||
railties (>= 3.0.0)
|
||||
rails3-jquery-autocomplete (1.0.5)
|
||||
rails3-jquery-autocomplete (1.0.6)
|
||||
rails (~> 3.0)
|
||||
railties (3.0.11)
|
||||
actionpack (= 3.0.11)
|
||||
|
|
|
@ -5,7 +5,7 @@ class Git::BlobsController < Git::BaseController
|
|||
before_filter :set_commit_hash
|
||||
|
||||
def show
|
||||
redirect_to project_repo_path(@project) unless @blob.present?
|
||||
redirect_to project_repo_path(@project) and return unless @blob.present?
|
||||
if params[:raw]
|
||||
image_url = Rails.root.to_s + "/" + @path
|
||||
|
||||
|
@ -18,12 +18,12 @@ class Git::BlobsController < Git::BaseController
|
|||
end
|
||||
|
||||
def edit
|
||||
redirect_to project_repo_path(@project) unless @blob.present?
|
||||
redirect_to project_repo_path(@project) and return unless @blob.present?
|
||||
authorize! :write, @project
|
||||
end
|
||||
|
||||
def update
|
||||
redirect_to project_repo_path(@project) unless @blob.present?
|
||||
redirect_to project_repo_path(@project) and return unless @blob.present?
|
||||
authorize! :write, @project
|
||||
# Here might be callbacks for notification purposes:
|
||||
# @git_repository.after_update_file do |repo, sha|
|
||||
|
@ -44,7 +44,7 @@ class Git::BlobsController < Git::BaseController
|
|||
end
|
||||
|
||||
def raw
|
||||
redirect_to project_repo_path(@project) unless @blob.present?
|
||||
redirect_to project_repo_path(@project) and return unless @blob.present?
|
||||
headers["Content-Disposition"] = %[attachment;filename="#{@blob.name}"]
|
||||
render :text => @blob.data, :content_type => @blob.mime_type
|
||||
end
|
||||
|
|
Loading…
Reference in New Issue