Download airbnb_clone/app/views/api/spots/index.json.jbuilder from Devendra174/react-code-dataset: direct link, hf CLI and curl.
- Browser
- Download file 969 Bytes
-
https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/airbnb_clone/app/views/api/spots/index.json.jbuilder
- Command line
-
hf download hf://datasets/Devendra174/react-code-dataset/airbnb_clone/app/views/api/spots/index.json.jbuilder
-
curl -L -o index.json.jbuilder https://huggingface.co/datasets/Devendra174/react-code-dataset/resolve/main/airbnb_clone/app/views/api/spots/index.json.jbuilder
969 Bytes
| @spots.each do |spot| | |
| json.set! spot.id do | |
| json.extract! spot, :id, :title, :description,:num_guests,:num_bedrooms, | |
| :num_beds,:num_baths,:listing_type, :price, :location, | |
| :loc_detail,:lat, :lng,:host_id, :wifi, :washer, | |
| :tv, :elevator, :parking, :kitchen | |
| json.hostId spot.host_id | |
| json.photoUrls spot.photos.map { |photo| url_for(photo) } | |
| end | |
| end | |
| # @spots.each do |spot| | |
| # json.set! spot.id do | |
| # json.extract! spot, :id, :title, :description,:num_guests,:num_bedrooms, | |
| # :num_beds,:num_baths,:listing_type, :price, :location, | |
| # :loc_detail,:lat, :lng,:host_id, :wifi, :washer, | |
| # :tv, :elevator, :parking, :kitchen | |
| # json.hostId spot.host_id | |
| # json.photoUrls spot.photos.map { |photo| url_for(photo) } | |
| # end | |
| # end | |