Skip to content

Instantly share code, notes, and snippets.

@msadoon
Last active August 29, 2015 14:02
Show Gist options
  • Save msadoon/2c4f87a81c61999e8d37 to your computer and use it in GitHub Desktop.
Save msadoon/2c4f87a81c61999e8d37 to your computer and use it in GitHub Desktop.
ajax request success template missing
def getgst
d { 'gets fired' }
s = Building.get_gst_for_building(params[:buildinginfo])
d { s.to_s('F') }
@var = s.to_s('F')
respond_to do |format|
format.html { render :text => @var.html_content }
end
$("#tenant_tenantbuildinginfo").change ->
$.ajax
url: "/buildings/getgst",
data: 'buildinginfo' : $(this).val(),
success: (data) ->
console.log data
$("#tenant_gst").val data
error: (data) ->
console.log data
return false
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment