Skip to main content

RubySource: The Robot Factory – Part One

By Darren Jones

Programming

Share:

Free JavaScript Book!

Write powerful, clean and maintainable JavaScript.

RRP $11.95

Adding and Deleting Resources in Sinatra In this tutorial I’m going to go through how to use Sinatra to add and remove resources to and from a database. To demonstrate this, I’m going to build a tiny web app called The Robot Factory that allows users to ‘build’ a production line of robots. Each robot will be saved to a database with randomly chosen head, body and legs and can also be deleted after it has been built. You can see the final version running here – http://robotfactory.heroku.com/ .

Read the original:
RubySource: The Robot Factory – Part One

Daz has been programming and building websites since the start of the millennium. He enjoys using Ruby and JavaScript and loves them both in their own special ways. He is the author of JavaScript: Novice to Ninja and Jump Start Sinatra. He also produced the 'Getting Started With Ruby' video tutorials for SitePoint and has written a number articles for SitePoint’s website. He was born in the city of Manchester and still lives there, where he teaches mathematics and enjoys playing water polo.

New books out now!

Learn valuable skills with a practical introduction to Python programming!


Give yourself more options and write higher quality CSS with CSS Optimization Basics.