# How to send data from controller to javascripts function

**URL:** <https://www.ruby-forum.com/t/how-to-send-data-from-controller-to-javascripts-function/134259>\
**Category:** Rails\
**Created:** [April 9, 2008, 11:03am UTC](https://www.ruby-forum.com/t/how-to-send-data-from-controller-to-javascripts-function/134259 "2008-04-09T11:03:46Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![goldmine](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/g/4bbf92/32.png) [@goldmine](https://www.ruby-forum.com/u/goldmine)\
**Post date:** [April 9, 2008, 11:03am UTC](https://www.ruby-forum.com/t/how-to-send-data-from-controller-to-javascripts-function/134259/1 "2008-04-09T11:03:46Z")

</div>

Is there anyway to call javascripts function in rails controller? if I  
prepared some data in the controller, and i want my javascripts  
function to handle these data, how should i do?
