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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 18, 20262026-05-18T21:47:06+00:00 2026-05-18T21:47:06+00:00

I have a rails backend and am testing the following jquery code against it:

  • 0

I have a rails backend and am testing the following jquery code against it:

  var content = $("#notification_content").val();
  var data = new Object();
  data.content = content;
  $.ajax({ url: "/notifications/detect_type.json", type:"POST", data: data, success: function(result  ){updateTypeDropDown(result)}});

This code works fine in Chrome and IE. However in Firefox (using Firebug), I see this:
http://localhost:3000/notifications/detect_type.json 406 Not Acceptable

here is a firefox request in the log:

Processing
NotificationsController#detect_type
(for 127.0.0.1 at 2010-12-21 17:05:59)
[POST] Parameters:
{“action”=>”detect_type”,
“content”=>”226 south emerson denver
co 80209”,
“controller”=>”notifications”} User
Columns (2.0ms) SHOW FIELDS FROM
users User Load (37.4ms) SELECT
* FROM users WHERE (users.id = ‘1’) LIMIT 1 Completed in 58ms (View:
1, DB: 40) |
406 Not Acceptable [http://localhost/notifications/detect_type.json]


here is a chrome request in the log:

Processing
NotificationsController#detect_type
(for 127.0.0.1 at 2010-12-21 17:06:41)
[POST] Parameters: {“action”=>”detect_type”,
“content”=>”226 south emerson 80209”,
“controller”=>”notifications”}
User Columns (2.1ms) SHOW FIELDS FROM users
User Load (30.4ms)
SELECT * FROM users WHERE (users.id = ‘1’) LIMIT 1 Completed
in 100ms (View: 1, DB: 33) |
200 OK [http://localhost/notifications/detect_type.json]

I’m stumped. Ideas?

  • 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-18T21:47:07+00:00Added an answer on May 18, 2026 at 9:47 pm

    Oddly enough, the solution was to do this on the rails side:

    format.js {
      render :text => type.to_json
    }
    format.json {
      render :json => type.to_json
    }
    

    JQuery bug? Not sure…

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

Sidebar

Related Questions

I'm very new with rails and I've been building a CMS application backend. All
I have Rails app with a Postgres backend. I need to add full text
I have a backbone.js front-end and Rails backend, and all my template files are
I am very new to rails development. I am creating a simple backend for
I have an existing rails backend website which makes json calls to server. Now,I
I have a RESTful rails backend where http requests(GET, PUT, POST, etc.) have much
I have a Cappuccino app that I am integrating with a Rails backend. A
I have a simple List-style Backbone app that I'm making with a Rails backend.
I have a Rails application that right now is pretty standard: Heroku/PostgreSQL backend, users
I have multiple rails applications talking to the same backend and I'd like them

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.