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
Rubinai ant bėgių
Search
Domas Bitvinskas
November 30, 2013
Programming
1
1.1k
Rubinai ant bėgių
A brief sweet intro into Ruby on Rails.
Domas Bitvinskas
November 30, 2013
Tweet
Share
More Decks by Domas Bitvinskas
See All by Domas Bitvinskas
3 cool AI things
nedomas
0
280
Apollo & GraphQL: What we learned building a multi-platform chat app
nedomas
1
240
Best kept secrets for 2019: GraphQL + Prisma
nedomas
1
73
Tensorflow.js ir web ateitis
nedomas
1
140
Hack the Open Source Growth
nedomas
1
98
Market your Open Source or kill it
nedomas
1
930
Ruby on Rails is dead
nedomas
2
1.2k
Why does Ruby own the startup world?
nedomas
0
670
Rockstars and Productivity
nedomas
1
960
Other Decks in Programming
See All in Programming
責務と認知負荷を整える! 抽象レベルを意識した関心の分離
yahiru
4
590
Introduction to kotlinx.rpc
arawn
0
700
Honoのおもしろいミドルウェアをみてみよう
yusukebe
1
210
sappoRo.R #12 初心者セッション
kosugitti
0
250
Pulsar2 を雰囲気で使ってみよう
anoken
0
240
XStateを用いた堅牢なReact Components設計~複雑なClient Stateをシンプルに~ @React Tokyo ミートアップ #2
kfurusho
1
910
Amazon ECS とマイクロサービスから考えるシステム構成
hiyanger
2
560
お前もAI鬼にならないか?👹Bolt & Cursor & Supabase & Vercelで人間をやめるぞ、ジョジョー!👺
taishiyade
6
4k
color-scheme: light dark; を完全に理解する
uhyo
5
390
Linux && Docker 研修/Linux && Docker training
forrep
24
4.5k
Amazon S3 TablesとAmazon S3 Metadataを触ってみた / 20250201-jawsug-tochigi-s3tables-s3metadata
kasacchiful
0
170
ファインディの テックブログ爆誕までの軌跡
starfish719
2
1.1k
Featured
See All Featured
RailsConf & Balkan Ruby 2019: The Past, Present, and Future of Rails at GitHub
eileencodes
133
33k
Understanding Cognitive Biases in Performance Measurement
bluesmoon
27
1.6k
Building an army of robots
kneath
303
45k
Rails Girls Zürich Keynote
gr2m
94
13k
A better future with KSS
kneath
238
17k
Code Review Best Practice
trishagee
67
18k
Fashionably flexible responsive web design (full day workshop)
malarkey
406
66k
Building Applications with DynamoDB
mza
93
6.2k
Building Flexible Design Systems
yeseniaperezcruz
328
38k
ReactJS: Keep Simple. Everything can be a component!
pedronauck
666
120k
The Straight Up "How To Draw Better" Workshop
denniskardys
232
140k
The Pragmatic Product Professional
lauravandoore
32
6.4k
Transcript
Rubinai ant bėgių
DOMAS BITVINSKAS domasbitvinskas.com @Nedomas
kodėl?
None
None
None
<HTML>
! ! ! ! ! <h1>F-18 jet fighter with Ruby</h1>
<html> <head> <title>Talks</title> </head> <body> <h1>F-18 jet fighter with Ruby</h1>
</body> </html>
! <h1>The Kids Aren’t Alright on TODAY</h1>
<h1>The Kids Aren’t Alright on TODAY</h1> ! ! ! <h1>The
Kids Aren’t Alright on 2013-11-30</h1> PROGRAMA, GENERUOJANTI HTML
<h1>The Kids Aren’t Alright on TODAY</h1> ! ! ! <h1>The
Kids Aren’t Alright on 2013-11-30</h1> SERVERIS
Ruby Rails HTML karkasas
konfigūracija
struktūra app bin config lib log public test
struktūra app bin config lib log public test
struktūra app … models views controllers bin config
struktūra app … models views controllers bin config M V
C
None
Controller View Model
http://todoapp.com /todos SERVERIS PUSLAPIS
PUSLAPIS /todos todos/index.html.erb Todo TodosController View Model Controller index Veiksmas
PUSLAPIS /todos/index todos/index.html.erb Todo TodosController View Model Controller index Veiksmas
None
None
None
None
None
rails new server
rails new server generate
rails generate scaffold Todo name:string on_date:date done:boolean
rake db:migrate
None
None
None
None
None
! <h1>Listing todos</h1> … <tr> <td>Launch the spaceship</td> <td>2015-07-24</td> …
</tr> … HTML
app/views/index.html.erb <h1>Listing todos</h1> <% @todos.each do |todo| %> <tr> <td><%=
todo.name %></td> <td><%= todo.on_date %></td> … </tr> <% end %> … RUBY/ERB
app/controllers/todos_controller.rb class TodosController … def index @todos = Todo.all end
… end RUBY
Užduotis
Sugeneruokite aplikaciją ingredientams. Ingredientas turės: • pavadinimą - name •
kainą - price • galiojimo datą - good_till • suvalgytas - eaten ! Pavyzdys: rails new todo_app cd todo_app rails server rails generate scaffold Todo name:string on_date:date done:boolean rake db:migrate TIPAI: string, float, integer, date, datetime, boolean