Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 3602038
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T20:41:45+00:00 2026-05-18T20:41:45+00:00

I am using authlogic-connect in Rails. I am using a simple haml template where

  • 0

I am using authlogic-connect in Rails. I am using a simple haml template where i dont want to show the authorization providers who are already added.

%h2 My Account
%form.authentication_form{:action => connect_path, :method => :post}
  %fieldset
    %input{:type => :hidden, :name => :authentication_type, :value => :user}
    %legend Add another Oauth or OpenID provider.
    .oauth_providers
      %ul
        - %w(google facebook twitter yahoo).each do |name|
          %li.oauth_provider
            -unless "{user.authenticated_with}" =~ "{name}"
              %img{:src => "/images/icons/#{name}.png"}
              %input{:type => :radio, :id => "#{name}_oauth_provider", :name => :oauth_provider, :value => name}
        .clearfix
  %input.submit{:name => :submit, :type => :submit, :value => "Update"}/

I am encountering the error type mismatch: String. The user.authenticated with returns a string.

def authenticated_with
      @authenticated_with ||= self.access_tokens.collect{|t| t.service_name.to_s}
    end

What is the possible problem?

Stacktrace:

ActionView::Template::Error (type mismatch: String given):
    7:       %ul
    8:         - %w(google facebook twitter yahoo).each do |name|
    9:           %li.oauth_provider
    10:             -unless "{user.authenticated_with}" =~ "{name}"
    11:               %img{:src => "/images/icons/#{name}.png"}
    12:               %input{:type => :radio, :id => "#{name}_oauth_provider", :name => :oauth_provider, :value => name}
    13:         .clearfix
  app/views/users/edit.html.haml:10:in `=~'
  app/views/users/edit.html.haml:10:in `_app_views_users_edit_html_haml___2062853011_2171399360_0'
  app/views/users/edit.html.haml:8:in `each'
  app/views/users/edit.html.haml:8:in `_app_views_users_edit_html_haml___2062853011_2171399360_0'

Extracted source (around line #10): — Shows error on line 10

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-18T20:41:46+00:00Added an answer on May 18, 2026 at 8:41 pm

    Pass a regular expression as argument to String#=~:

    >> string = "el"
    >> "hello" =~ /#{string}/
    => 1
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am using Authlogic to do some simple signup and login stuff. In my
Using authlogic 2.1.3, and authlogic-oid 1.0.4 I receive the following error as soon as
Using Authlogic, the time format for @user.last_login_at looks like this: Mon Apr 12 16:52:56
I am using Authlogic for my user authentication, and would like yo add roles
I'm using Authlogic for authentication in my app, using the standard User and UserSession
I'm using Authlogic to authenticate users. I understand how to create and use sessions,
Everything seems to be working fine with my implementation of Facebooker with Authlogic (using
I've previously implemented Authlogic for authorization on my site. Now however I wish to
I'm adding a password reset feature to my Rails application that uses Authlogic. I
Using online interfaces to a version control system is a nice way to have

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.