benediktms / desk-dash

An MVP for finding co-working spaces.
1 stars 0 forks source link

review feature #32

Closed jselvaraj95 closed 3 years ago

jselvaraj95 commented 3 years ago
benediktms commented 3 years ago

I've looked at the error we get when deleting a review. The params don't seem to hold the correct information, e.g. when trying to delete a review for the first space (id: 1), the params that get passed say space_id: 3. Additionally the review id in this particular example is 3, but the params say it is 1. So I'm pretty sure that is what is causing issues. Not sure what exactly the cause is but will continue looking. Could be something with the routes? @brovani did you encounter something similar when you set up the bookings?

benediktms commented 3 years ago

Truns out we were simply missing the space_id params: <%= link_to 'Delete', space_review_path(@space[:id], review), method: :delete %> Should work as intended now.

benediktms commented 3 years ago

I've fixed an issue where the rating wouldn't get accepted by the form (I forgot to add it to the strong params in the controller). I also added linting for ruby and js to make working to best standards a bit easier however this stuff is temperamental and will require setup. If you don't want to use it feel free to just ignore it.