Skip to content

Instantly share code, notes, and snippets.

@thomasstr
Created September 30, 2013 08:48
Show Gist options
  • Save thomasstr/6761020 to your computer and use it in GitHub Desktop.
Save thomasstr/6761020 to your computer and use it in GitHub Desktop.
<script type="text/javascript">
$(document).ready(function () {
$("#project_postnumber").blur(function(){
$.ajax({url: '/project/postplace', type: 'POST'})
.done(function(response){
$("#project_postplace").val(response);
});
});
});
</script>
def postplace
@find_postplace = Postnumberregister.find_by_postnumber(params[:postnumber])
render :text => @find_postplace.postplace
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment