How to communicate with the AngularJS controller and the Rails Controller?

Please help me

I want to know how the helper methods of rails 3.2 can be used in AngularJS

Like for example :-

I am using acts-as-messageable gem in my application.

It has a helper_method called send_message which can be used in the controller of the rails application.

So how can I use this helper method inside of the AngularJS controller.


Basically what I need to know is "How to communicate with AngularJS controller and the Rails Controller?"

Is it even possible to do so?Please Justify


Thanks In Advance

You seem to be implying AngulearJs runs on the server. It does not. AngularJS is a Javascript client side framework and rails is a server side Ruby framework.

That being said, I guess you could setup a restful endpoint in in rails and call it from an AngularJs client. Which I would consider communication between the frameworks.