updated rails post model