spree-contrib / spree_social

Building block for spree social networking features (provides authentication and account linkage)
http://guides.spreecommerce.org
BSD 3-Clause "New" or "Revised" License
213 stars 281 forks source link

Possible conflict between spree_social and spree_18n because of the routing-filter gem #243

Closed vascosantos closed 4 years ago

vascosantos commented 4 years ago

I am having some trouble getting the spree_social extension to generate the omniauth urls as /users/auth/:provider because of the filter: locale in routes.rb of spree_i18n.

I always get /:locale/users/auth/:provider instead.

How can I add an exclude option like in here: https://github.com/svenfuchs/routing-filter/issues/53 ?

vascosantos commented 4 years ago

Ok, I found a way to go around this by specifying a locale: '' parameter whenever I call for a link I don't want the routing-filter to mess with. Example:

<%= link_to(spree.spree_user_omniauth_authorize_url(provider: "facebook", locale: ''), class: "fb-login") do %>
  Login with Facebook
<% end %>