Answered step by step
Verified Expert Solution
Link Copied!

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

blur-text-image

Get Instant Access to Expert-Tailored Solutions

See step-by-step solutions with expert insights and AI powered tools for academic success

Step: 2

blur-text-image

Step: 3

blur-text-image

Ace Your Homework with AI

Get the answers you need in no time with our AI-driven, step-by-step assistance

Get Started

Recommended Textbook for

More Books

Students also viewed these Databases questions

Question

Discuss communication challenges in a global environment.

Answered: 1 week ago