Rocking and Railing

Today we worked more in Rails and spent some time getting into the flow and structure of the way the MVC and routes work together in the framework. Our instructor, Russell, even pulled together a fun little drawing for us to use as a helpful visual:

8Art © Russell Osborne

When you initiate a new project in Rails, it automatically generates a LOT of folders and files for you (not all of which you necessarily need to use in a project), and we spent some time going through and orienting ourselves to the new landscape.

We also talked about authorization and use privilege within Rails and worked on setting up login pages and permits for the database programs we started yesterday. Now only users who are logged in can access the index on the ‘Books’ database and can create, edit, and delete new book posts.

New ‘Login’ page — sans styling

Tomorrow, we’re going to work through the final requirements for the project, which will involve creating associations between each book entry and the user who added it. We’ll also have to set conditions to prevent editing and deletion of a book unless you’re the entry creator. Can’t wait!

Song of the Day: “Belly of the Beat” by Grimes