Save 36% for Black Friday! Learn more

Ask A Question

Notifications

You’re not receiving notifications from this thread.

Processing by EquipmentController#show as */*

John Stegman asked in Rails

I'm getting this response when I send a jquery get request to render the show page for a piece of equipment - or any other show page for any object in the rails app for that matter (customer, warranty, etc)

I am using a select_tag to find the id of the item in question

<%= select_tag( "equip_id", options_from_collection_for_select(@equipment, :id, :equip_id, (@equipment_id.nil?) ? nil : @equipment_id), {:class => 'equipTag'}) %>

and am seeing that the app is getting the proper id - using alert - see the code below. However, when the server responds to the request, I get
Processing by EquipmentController#show as */* **
instead of
**Processing by EquipmentController#show as HTML

which I receive if I use a link to show in a table lising of the equipment items or enter the id manually in the browser address bar - /equipment/4567 for example

javascript code -

$(document).on('change', '.equipTag', function(){

    var equipId = $(this).val();
    alert (equipId);
    $.get('/equipment/' + equipId);

});

I'd appreciate any help. Thanks in advance.
John

Reply
Join the discussion
Create an account Log in

Want to stay up-to-date with Ruby on Rails?

Join 86,946+ developers who get early access to new tutorials, screencasts, articles, and more.

    We care about the protection of your data. Read our Privacy Policy.