On Github emitche / rails-mini-talk
February 2016
Girl Develop It Ann Arbor
Ruby on Rails is a web development framework that uses Ruby, a Model View Controller pattern (MVC), and lots of built in awesomeness to help developers build websites and apps.
Ruby is an object-oriented programming language.
A collection of people is an object.
Each individual person is an object.
Find a person with an id of 1: p1 = Person.find(1)
Find out a person's name: p1.name
Interact with all the people: Person.all
In Intro to Ruby, you have likely interacted with IRB (the interactive Ruby shell).
Rails has a built-in shell called Rails Console based off of IRB.
layouts/templates that define how to show content. They communicate with the controller, receiving variables and information that are used to display data.
are the glue between models and views. Hand off data from the model to the view. Take user input from the view and save those changes to the database by communicating with the model.
assign URLs to specfic controllers and their actions (methods within each controller). Example: my.app/people pulls up the People controller and the index action.
communicates with the database. Responsible for business logic. Represents data objects as models. In charge of associations between models.
define the structure of objects (through methods, properties).