Rails like html form serializer