From cb4340819e4961beef473165ce6a31da5d0558c8 Mon Sep 17 00:00:00 2001 From: Ben Halpern Date: Tue, 12 Jun 2018 21:40:55 -0400 Subject: [PATCH] Change Twitter callback_url --- app/controllers/omniauth_callbacks_controller.rb | 2 +- app/views/articles/_main_stories_feed.html.erb | 2 +- app/views/articles/_sidebar_additional.html.erb | 2 +- .../devise/registrations/_registration_form.html.erb | 2 +- app/views/giveaways/edit.html.erb | 2 +- app/views/layouts/_nav_menu.html.erb | 2 +- app/views/layouts/_signup_modal.html.erb | 2 +- app/views/notifications/_signup_cta_test.html.erb | 8 ++++---- app/views/pages/membership_form.html.erb | 2 +- spec/features/user_views_and_closes_onboarding_spec.rb | 2 +- 10 files changed, 13 insertions(+), 13 deletions(-) diff --git a/app/controllers/omniauth_callbacks_controller.rb b/app/controllers/omniauth_callbacks_controller.rb index 9929af82f..2e8d83349 100644 --- a/app/controllers/omniauth_callbacks_controller.rb +++ b/app/controllers/omniauth_callbacks_controller.rb @@ -4,7 +4,7 @@ class OmniauthCallbacksController < Devise::OmniauthCallbacksController # raise env["omniauth.auth"].to_yaml class_eval %Q{ def #{provider} - cta_variant = request.env["omniauth.params"]['state'] + cta_variant = request.env["omniauth.params"]['state'].to_s @user = AuthorizationService.new(request.env["omniauth.auth"], current_user, cta_variant).get_user if @user.persisted? remember_me(@user) diff --git a/app/views/articles/_main_stories_feed.html.erb b/app/views/articles/_main_stories_feed.html.erb index c9bb76dc4..da81c9165 100644 --- a/app/views/articles/_main_stories_feed.html.erb +++ b/app/views/articles/_main_stories_feed.html.erb @@ -14,7 +14,7 @@ <% end %>
- + TWITTER diff --git a/app/views/articles/_sidebar_additional.html.erb b/app/views/articles/_sidebar_additional.html.erb index 732d879d6..6dde8c2b6 100644 --- a/app/views/articles/_sidebar_additional.html.erb +++ b/app/views/articles/_sidebar_additional.html.erb @@ -56,7 +56,7 @@ - +
Via Twitter
diff --git a/app/views/layouts/_signup_modal.html.erb b/app/views/layouts/_signup_modal.html.erb index f617c02ad..db7c8c04b 100644 --- a/app/views/layouts/_signup_modal.html.erb +++ b/app/views/layouts/_signup_modal.html.erb @@ -17,7 +17,7 @@

We’re a place where coders share, stay up-to-date and grow their careers.

-
+ or - +
<% else %> @@ -21,9 +21,9 @@ Create your account to customize your feed and start participating.

- + or - +
<%=image_tag(cl_image_path(asset_path("/assets/sloan.png"), :type=>"fetch", diff --git a/app/views/pages/membership_form.html.erb b/app/views/pages/membership_form.html.erb index a00edf0db..6a2ae2fec 100644 --- a/app/views/pages/membership_form.html.erb +++ b/app/views/pages/membership_form.html.erb @@ -19,7 +19,7 @@ " /> " />

Sign in to get your membership

- + TWITTER diff --git a/spec/features/user_views_and_closes_onboarding_spec.rb b/spec/features/user_views_and_closes_onboarding_spec.rb index bc6512d1f..75b0c555e 100644 --- a/spec/features/user_views_and_closes_onboarding_spec.rb +++ b/spec/features/user_views_and_closes_onboarding_spec.rb @@ -75,7 +75,7 @@ describe "User views and closes onboarding", type: :feature, js: true do end it "with Twitter" do - in_feed_link = find_link(href: "/users/auth/twitter?state=in-feed-cta") + in_feed_link = find_link(href: "/users/auth/twitter?callback_url=https://dev.to") in_feed_link.click expect(find(".global-modal-inner")).to have_content("WELCOME!") end