how to call method in one application from another application in ruby on rails

I want to call the method and get the response in my application from another application in Ruby on Rails technology, but here cross site scripting problem is there. so, i can i resolve this issue please help me it would be great.

def get_course @course = Course.find(params[:id]) end

now i want to call this above method from this application which is running in domain

def call_course_method @course = redirect_to "" end

but it would be redirect into application. i want to call get_course method and get @course object internally without redirect to another site. please it's very urgent..we have to deploy the application

Thanks in advance.

You can do it 2 ways. either write an web service or use an iframe in your view.

seems it is a collection method on so u can pass the src of the iframe as

Hope it will help u