add rails 3 compatibility for forms and ajax