fixed a bug on views
changed the associations the way it is bec it was causing a bug on ajax request
changed views and routes in order to post and get fom javascript