Noob scoping issue, I imagine. :\\
class ApplicationController < ActionController::Base protect_from_forgery @locations = get_locations def get_locat
Even the question is quite old, you can also call your controller action anywhere just by calling:
ApplicationController.new.get_locations