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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 18, 20262026-06-18T00:13:48+00:00 2026-06-18T00:13:48+00:00

I have a controller with a single index action. The same resource has some

  • 0

I have a controller with a single index action. The same resource has some static assets which don’t require anything in the controller. There used to be some others which are now gone but there are lingering links here and there on the web.

Is there a way I can match any /resource/* request that doesn’t have an action defined in the controller or a named view in app/views/resources/____ and route it to a default (resource#index would be fine in this case).

  • 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-18T00:13:49+00:00Added an answer on June 18, 2026 at 12:13 am
    class MyConstraint
      BYPASSED_ROUTES = ['anything']
    
      def matches?(request)
        BYPASSED_ROUTES.map {|r| request.path.include?(r)}.empty?
      end
    end
    
    MyApp::Application.routes.draw do
      # Insert other routes before the catch-all one
      match "/resource/*path" => "resource#index", :constraints => MyConstraint.new
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have controller users . In this controller I have action account which is
I have a controller called MetricsController with a single action method: public class MetricsController
I am stuck in a weird situation. I have a controller action which is
I have a the following controller containing one action with a single parameter: public
I have a single controller, Index , that manages several non-specialized informational pages (e.g
I have controller with action new , and I want it to create ActiveRecord::Base
I have @Controller @RequestMapping(value=core/*) public class CoreController { public static String exceptionOccurredView = /core/exceptionOccurred;
Hi guys i have controller which returns a partial view, the controller is called
I have an ASP.Net application which has an area called 'Customers'. This area has
I have a controller called AuctionsController. In it I have Actions called Index() and

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.