Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
Intro to Rails
Search
Sebastian Sogamoso
June 20, 2015
Programming
0
120
Intro to Rails
Brief introduction to Rails followed by a workshop.
Presented at: RailsGirls Bogotá 2015
Sebastian Sogamoso
June 20, 2015
Tweet
Share
More Decks by Sebastian Sogamoso
See All by Sebastian Sogamoso
The overnight failure
sebastianso
0
100
The Overnight Failure
sebastianso
1
660
Refactor yourself
sebastianso
1
150
The overnight failure
sebastianso
0
430
The overnight failure
sebastianso
0
280
Leveraging N+1 queries
sebastianso
0
72
TCP Socket programming in Ruby
sebastianso
1
180
Dealing with payments
sebastianso
3
1.3k
When making money becomes a headache
sebastianso
0
150
Other Decks in Programming
See All in Programming
AI 時代だからこそ抑えたい「価値のある」PHP ユニットテストを書く技術 #phpconfuk / phpcon-fukuoka-2025
shogogg
1
130
詳細の決定を遅らせつつ実装を早くする
shimabox
1
770
Webサーバーサイド言語としてのRustについて
kouyuume
1
5.1k
TransformerからMCPまで(現代AIを理解するための羅針盤)
mickey_kubo
7
6k
pnpm に provenance のダウングレード を検出する PR を出してみた
ryo_manba
1
200
実践Claude Code:20の失敗から学ぶAIペアプログラミング
takedatakashi
18
9.6k
iOSでSVG画像を扱う
kishikawakatsumi
0
180
EMこそClaude Codeでコード調査しよう
shibayu36
0
670
GitHub Copilotを使いこなせ!/mastering_github_copilot!
kotakageyama
2
810
PHPライセンス変更の議論を通じて学ぶOSSライセンスの基礎
matsuo_atsushi
0
110
Eloquentを使ってどこまでコードの治安を保てるのか?を新人が考察してみた
itokoh0405
0
3k
CSC509 Lecture 09
javiergs
PRO
0
290
Featured
See All Featured
Building Flexible Design Systems
yeseniaperezcruz
329
39k
Why You Should Never Use an ORM
jnunemaker
PRO
60
9.6k
Evolution of real-time – Irina Nazarova, EuRuKo, 2024
irinanazarova
9
1k
Thoughts on Productivity
jonyablonski
73
4.9k
The Pragmatic Product Professional
lauravandoore
36
7k
Music & Morning Musume
bryan
46
6.9k
Facilitating Awesome Meetings
lara
57
6.6k
Fashionably flexible responsive web design (full day workshop)
malarkey
407
66k
GitHub's CSS Performance
jonrohan
1032
470k
Agile that works and the tools we love
rasmusluckow
331
21k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
658
61k
A Modern Web Designer's Workflow
chriscoyier
697
190k
Transcript
Intro to Rails Sebastián Sogamoso @sebasoga
Intro to Rails What is Rails?
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails What is a web page?
Intro to Rails
Intro to Rails
Intro to Rails
Intro to Rails
Intro to Rails https://railsgirls.com/bogota
Intro to Rails https://railsgirls.com/bogota
Intro to Rails https://railsgirls.com/bogota Request
Intro to Rails https://railsgirls.com/bogota Find file: cities/bogota.html
Intro to Rails https://railsgirls.com/bogota <html lang=“eng”> <head> <meta charset=“utf-8”>…
Intro to Rails https://railsgirls.com/bogota <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Intro to Rails What is a web application?
Intro to Rails
Intro to Rails https://www.facebook.com/railsgirls <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Request
Intro to Rails m/railsgirls charset=“utf-8”>… • Get list of fans
• Get list of comments • Order the comments by date • Get group photos • …
Intro to Rails What is Rails?
Intro to Rails Rails is a framework for creating web
applications in Ruby
Intro to Rails How does Rails do that?
Intro to Rails By following the this ideas: • MVC
pattern • Convention over configuration
Intro to Rails MVC Pattern Model View Controller
Intro to Rails Model
Intro to Rails This class (model) represents a table in
the database called “carts”
Intro to Rails This class (model) represents a table in
the database called “carts” Convention over configuration
Intro to Rails Rails includes an ORM called ActiveRecord
Intro to Rails Associations with other models
Intro to Rails Validations of its own state
Intro to Rails “Business logic”
Intro to Rails Controller
Intro to Rails Methods are called actions
Intro to Rails Methods use models to access the database
Intro to Rails Methods set instance variables
Intro to Rails Can explicitly render or redirect
Intro to Rails Can access the request parameters as a
hash
Intro to Rails View
Intro to Rails Uses ERB, Rails default templating language
Intro to Rails Regular HTML
Intro to Rails Special tags to execute Ruby
Intro to Rails Access to the instance variables set in
the controller
Intro to Rails How do they work together?
Intro to Rails http://my-rails-app.com <html lang=“eng”> <head> <meta charset=“utf-8”>… Response
Request
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller
Intro to Rails Model View Controller Router
Intro to Rails How do I get started?
Intro to Rails $ gem install rails
Intro to Rails $ gem install rails Just the name
for Ruby libraries
Intro to Rails
Intro to Rails Rails is modular, made out of other
18 libraries
Intro to Rails $ rails new my_app
Intro to Rails $ rails new my_app The name of
your Rails app
Intro to Rails
Intro to Rails Creates a bunch of files and then
install the dependencies
Intro to Rails
Intro to Rails File with the list of libraries (gems)
you want to use
Intro to Rails Where app configuration files are
Intro to Rails Where database schema and migrations are
Intro to Rails Where tests go
Intro to Rails Where your application code is $ cd
app/
Intro to Rails
Intro to Rails Where CSS, JS and images go
Intro to Rails Where controllers go
Intro to Rails Helpers are “globally scoped” methods intended to
be used mainly in views and controllers
Intro to Rails Classes that make sending email easy
Intro to Rails Where models go
Intro to Rails Where views go
Let’s see this in action! @sebasoga