New Discussion

Notifications

You’re not receiving notifications from this thread.

Processing by EquipmentController#show as */*

0
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

Join the discussion
Create an account Log in

Learning Ruby on Rails? Join our newsletter.

We won't send you spam. Unsubscribe at any time.