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 8319197
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 8, 20262026-06-08T22:14:46+00:00 2026-06-08T22:14:46+00:00

I have a single secure payment page at secure.website.com. Using devise to sign out

  • 0

I have a single secure payment page at secure.website.com. Using devise to sign out on that specific page, signing out breaks saying there’s no user with id=sign_out. I am guessing this is because when i’m on the secure page, all the links on that page also have secure.website.com/users/sign_out (for example).

rather than always specifying that I want to use www as the url in my link_to…i want to set it to default to that. I tried doing default_url_options but that didn’t seem to work. How do I make sure all links are always www subdomain unless otherwise specified?

lastly, what i’ve been doing to guarantee a page is www unless on the secure page is this:

  def always_use_www
    if params[:controller] != 'subscriptions' && request.subdomain != 'www'
      redirect_to :subdomain => "www"
    end
  end

i put this in the application controller as a before filter. this seems like a really poor way of doing it. is there a ‘right’ way? I only want that one secure page to have a different subdomain…otherwise always use www.

  • 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-06-08T22:14:49+00:00Added an answer on June 8, 2026 at 10:14 pm

    You can create a method default_url_options:

    def default_url_options
      {
        :host => "www.example.com",
        :only_path => false
      }
    end
    

    You can put this method in application controller of the subcontrollers. To the best of my knowledge, you can only set the whole host, not subdomain. In general, you can put any option url_for supports in this method.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a single page website that changes content based on variables passed through
I have an implementation for my website to have facebook single sign on, using
I am working on a single sign-on login page using Shibboleth that will be
I have A single page that has the following structure <form runat=server><placeholder></placeholder></form> I have
I'd like to know if it is possible to have a secure single sign-on
I have implemented single sign on functionality using Facebook's SDK in my iPhone application,
We have an ASP.NET MVC website that a customer is requesting Active Directory single
I'm trying to figure out a good, secure way to have a single directory
I have a single-view application that takes in a username and a password and
I have a single-threaded application that uses 3 SQLite databases in 3 different files

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.