Fixed some Rails4 deprecation errors on template#edit