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
160
The overnight failure
sebastianso
0
430
The overnight failure
sebastianso
0
290
Leveraging N+1 queries
sebastianso
0
78
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
Fundamentals of Software Engineering In the Age of AI
therealdanvega
2
270
Goの型安全性で実現する複数プロダクトの権限管理
ishikawa_pro
2
490
Go Conference mini in Sendai 2026 : Goに新機能を提案し実装されるまでのフロー徹底解説
yamatoya
0
620
ベクトル検索のフィルタを用いた機械学習モデルとの統合 / python-meetup-fukuoka-06-vector-attr
monochromegane
2
490
PHPで TLSのプロトコルを実装してみる
higaki_program
0
300
Symfony + NelmioApiDocBundle を使った スキーマ駆動開発 / Schema Driven Development with NelmioApiDocBundle
okashoi
0
200
脱 雰囲気実装!AgentCoreを良い感じにWEBアプリケーションに組み込むために
takuyay0ne
3
360
The Past, Present, and Future of Enterprise Java
ivargrimstad
0
720
Redox OS でのネームスペース管理と chroot の実現
isanethen
0
330
社内規程RAGの精度を73.3% → 100%に改善した話
oharu121
13
8.2k
CSC307 Lecture 14
javiergs
PRO
0
480
go directiveを最新にしすぎないで欲しい話──あるいは、Go 1.26からgo mod initで作られるgo directiveの値が変わる話 / Go 1.26 リリースパーティ
arthur1
2
570
Featured
See All Featured
Leading Effective Engineering Teams in the AI Era
addyosmani
9
1.7k
Lessons Learnt from Crawling 1000+ Websites
charlesmeaden
PRO
1
1.1k
For a Future-Friendly Web
brad_frost
183
10k
Fight the Zombie Pattern Library - RWD Summit 2016
marcelosomers
234
17k
The browser strikes back
jonoalderson
0
810
A brief & incomplete history of UX Design for the World Wide Web: 1989–2019
jct
1
320
Statistics for Hackers
jakevdp
799
230k
Context Engineering - Making Every Token Count
addyosmani
9
770
Beyond borders and beyond the search box: How to win the global "messy middle" with AI-driven SEO
davidcarrasco
3
79
RailsConf 2023
tenderlove
30
1.4k
世界の人気アプリ100個を分析して見えたペイウォール設計の心得
akihiro_kokubo
PRO
67
37k
Noah Learner - AI + Me: how we built a GSC Bulk Export data pipeline
techseoconnect
PRO
0
140
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