Коммит a7087cb9 создал по автору Valery Sizov's avatar Valery Sizov
Просмотр файлов

HTTP_REFERER not properly set in Safari

владелец 6b028ed8
......@@ -38,7 +38,7 @@ def test
flash[:alert] = 'Hook execution failed. Ensure the group has a project with commits.'
end
redirect_to :back
redirect_back_or_default(default: { action: 'index' })
end
def destroy
......
......@@ -14,16 +14,19 @@ def create
if request.referer && request.referer.include?('admin')
redirect_to [:admin, @group], notice: 'New LDAP link saved'
else
redirect_to :back, notice: 'New LDAP link saved'
redirect_back_or_default(default: { action: 'index' }, options: { notice: 'New LDAP link saved' })
end
else
redirect_to :back, alert: "Could not create new LDAP link: #{ldap_group_link.errors.full_messages * ', '}"
redirect_back_or_default(
default: { action: 'index' },
options: { alert: "Could not create new LDAP link: #{ldap_group_link.errors.full_messages * ', '}" }
)
end
end
def destroy
@group.ldap_group_links.where(id: params[:id]).destroy_all
redirect_to :back, notice: 'LDAP link removed'
redirect_back_or_default(default: { action: 'index' }, options: { notice: 'LDAP link removed' })
end
private
......
......@@ -9,6 +9,6 @@ def destroy
project.approvers.find(params[:id]).destroy
end
redirect_to :back
redirect_back_or_default(default: { action: 'index' })
end
end
Поддерживает Markdown
0% или .
You are about to add 0 people to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Пожалуйста, зарегистрируйтесь или чтобы прокомментировать