Call Rails from Javascript

This is kinda what ajax is used for.