ruby on rails

What is Ruby on Rails?

Generic, meaningless, typical answer: “Ruby on Rails is an open-source web application framework and object-oriented programming language.” Cool man…

My definition:  Ruby is the "smart code." It's the logic that makes tricky things happen, like giving you your bank account info after you enter the correct password.

Ruby doesn’t make your things visually pretty, like HTML & CSS.
She doesn’t make things glimmery with movement like jQuery & JavaScript.

Joined at the head, two octocats attached

Ruby and Rails: A Love Story

Ruby is like an adult who has her shit together. She doesn’t bother with nonsense brackets and semicolons. She doesn’t respond in wishy washing truthy/falsey nonsense.

She’s clear, concise, and she wants to perform. Rails on the other hand… Rails was all like, “Hey I hate doing that shit. I wanna party. I wanna play with users and take them to new places.” Ruby had found her match!

So Rails is the setup that puts the smart code in the right place to be viewed at the right time (like after a password is entered) and by a specific url.

Anyways! How do Ruby and Rails get it on?

1. Generate a new rails app

rails new [app name]
ex: rails new outfit_app

2.  Scaffold + Migrate

rails g scaffold [model name] [model attributes]
rake db:migrate
ex: rails g scaffold Shoe model color:string size:integer description:text
ex: rake db:migrate

3. Open up the file set of your app!
4. Add methods (aka actions) to make your code do something like, count shoes based on color.
5. Stylize / Haml / Test / Etc

Tonight’s objective: 

too tired

Know the feeling?

The actual purpose of this page is to write out my ROR questions and take useful notes on the language. But I think it’s time to take a break!

Redo both front end and back end lessons from today.
Maybe make language pages less abstract.

what are your thoughts?

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )

Connecting to %s