Answered step by step
Verified Expert Solution
Question
1 Approved Answer
ruby on rails sinatra require 'sinatra' require 'data_mapper' DataMapper::setup(:default, sqlite3://#{Dir.pwd}/dogs.db) class Dog include DataMapper::Resource property :id, Serial property :name, Text property :breed, Text property :weight,
ruby on rails sinatra
require 'sinatra' require 'data_mapper'
DataMapper::setup(:default, "sqlite3://#{Dir.pwd}/dogs.db")
class Dog include DataMapper::Resource property :id, Serial property :name, Text property :breed, Text property :weight, Integer end
DataMapper.finalize Dog.auto_upgrade!
#display the name and breed and weight of every dog get '/dogs' do end
#create a new dog post '/dogs' do end
#update an existing dog, given its id and new information patch '/dogs' do end
#delete a dog, given its id delete '/dogs' do
end
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started