O'Reilly logo

Learning Sinatra by Manoj Sehrawat, Sudeep Agarwal

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

Summary

In this chapter, you learned how to connect to a database (MySQL) with the necessary parameters and use the mysql gem with sequel. You also learned how to open and use the interactive console (irb) with Sinatra and Sequel. We covered the details of Sequel models with various useful class-level and instance-level methods. Next, we covered the available hooks and callbacks. Finally, we discussed associations with eager loading and joins in order to scale and optimize the application.

In the next chapter, you will learn how session works and implement authentication and authorization.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required