Tuesday, July 8, 2014

Day 42: Rails (Models)

Coding Dojo teaches you how to work with Models first when learning Rails. I especially thought this was clever because models do take some time to learn and can be learned independently. The other components (controllers and views) are heavily reliant on each other along with the routing, so it's best to chip away at these as simple as possible.

Rails uses ORM (Object Relational Mapping) to communicate with the database. Regular SQL queries can be used however it is frowned upon in the Rails community. When possible, we should always be using ORM.


Above is just a picture of me working with the database in the Terminal. Eventually these queries will all be made in the application code but its good to get comfortable with queries using the terminal as practice.

No comments:

Post a Comment