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

  • Home
  • SEARCH
  • 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 7668661
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 31, 20262026-05-31T15:25:03+00:00 2026-05-31T15:25:03+00:00

In application.js … $(document).ready(function () { $(#new_academic_formation).validate({ debug: true, rules: { academic_formation[id]: { required:

  • 0

In application.js …

$(document).ready(function () {
$("#new_academic_formation").validate({
debug: true,
rules: {
      "academic_formation[id]": {
      required: true,  
      minlength: 3, 
      remote:  "/academic_formations/check_id"
      }
}     
});
});

In my academic_formations_controller.rb

def check_id
    @academic_formation = AcademicFormation.find(params[:id])
    respond_to do |format|
      format.json { render :json => !@academic_formation }
    end
end

And finally in file routes.rb

resources :academic_formations
match "/academic_formations/check_id" => 'academic_formations#check_id'

The problem is that instead of calling the action check_id rails is calling the action show.

  • 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-31T15:25:04+00:00Added an answer on May 31, 2026 at 3:25 pm

    You’ll need to move match "/academic_formations/check_id" => 'academic_formations#check_id' before resources :academic_formations.

    This is straight from the docs.

    “Rails routes are matched in the order they are specified, so if you have a resources :photos above a get 'photos/poll' the show action’s route for the resources line will be matched before the get line. To fix this, move the get line above the resources line so that it is matched first.”

    OR

    Since yours is a resourceful route, you may add a route as, if it applies to a collection(you can read more about that in the docs linked above) and if it’s a get method as :

    resources :academic_formations do
      collection do
        get 'check_id'
      end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

application = webapp.WSGIApplication( [(r'/main/profile/([a-f0-9]{40})', ProfileHandler)], debug=True) The regex in the above parameter will not
Application works fine. I can access everything in debug except for an Array Adapter
My application has a complex schema for the domain entity. It is required use
Application: WPF Application consisting of a textbox on top and a listbox below Users
Application : HTA (therefore IE) This is an application that uses SendKeys to populate
Application is written in delphi 2010 and the underlying dll is a C++ dll.
Application[temp] = 8; should set the value 8 to the key temp . However,
Application names on Google Play don't need to be unique, and it's possible to
Application is running in my local system app.config file <add key=dbconn value=Data Source=(local);database=VTech;User ID=sa;Password=sa;
Application launch through Java web start(JWS) checks for update when we are launching it.

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.