Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
7bf9aef1
Commit
7bf9aef1
authored
May 07, 2020
by
Peter Leitzen
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'remove-unused-url-param' into 'master'
Remove unused URL param See merge request gitlab-org/gitlab!31343
parents
5b639a29
3fd7c847
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
2 additions
and
11 deletions
+2
-11
ee/app/controllers/subscriptions_controller.rb
ee/app/controllers/subscriptions_controller.rb
+1
-10
ee/spec/controllers/subscriptions_controller_spec.rb
ee/spec/controllers/subscriptions_controller_spec.rb
+1
-1
No files found.
ee/app/controllers/subscriptions_controller.rb
View file @
7bf9aef1
...
...
@@ -24,7 +24,7 @@ class SubscriptionsController < ApplicationController
def
new
return
if
current_user
store_location_for
_user
store_location_for
:user
,
request
.
fullpath
redirect_to
new_user_registration_path
(
redirect_from:
'checkout'
)
end
...
...
@@ -85,15 +85,6 @@ class SubscriptionsController < ApplicationController
Gitlab
::
SubscriptionPortal
::
Client
end
def
store_location_for_user
redirect_url
=
url_for
(
safe_params
.
merge
(
experiment_started:
true
))
store_location_for
:user
,
redirect_url
end
def
experiment_already_started?
params
[
:experiment_started
].
present?
end
def
customer_portal_new_subscription_url
"
#{
EE
::
SUBSCRIPTIONS_URL
}
/subscriptions/new?plan_id=
#{
params
[
:plan_id
]
}
&transaction=create_subscription"
end
...
...
ee/spec/controllers/subscriptions_controller_spec.rb
View file @
7bf9aef1
...
...
@@ -15,7 +15,7 @@ describe SubscriptionsController do
it
'stores subscription URL for later'
do
subject
expected_subscription_path
=
new_subscriptions_path
(
experiment_started:
true
,
plan_id:
'bronze_id'
)
expected_subscription_path
=
new_subscriptions_path
(
plan_id:
'bronze_id'
)
expect
(
controller
.
stored_location_for
(
:user
)).
to
eq
(
expected_subscription_path
)
end
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment