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
Sponsored
·
Your Podcast. Everywhere. Effortlessly.
Share. Educate. Inspire. Entertain. You do you. We'll handle the rest.
→
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
510
Apollo & GraphQL: What we learned building a multi-platform chat app
nedomas
1
410
Best kept secrets for 2019: GraphQL + Prisma
nedomas
1
93
Tensorflow.js ir web ateitis
nedomas
1
190
Hack the Open Source Growth
nedomas
1
150
Market your Open Source or kill it
nedomas
1
1k
Ruby on Rails is dead
nedomas
2
1.2k
Why does Ruby own the startup world?
nedomas
0
700
Rockstars and Productivity
nedomas
1
1k
Other Decks in Programming
See All in Programming
CSC307 Lecture 06
javiergs
PRO
0
660
OSSとなったswift-buildで Xcodeのビルドを差し替えられるため 自分でXcodeを直せる時代になっている ダイアモンド問題編
yimajo
3
520
Data-Centric Kaggle
isax1015
2
710
AI によるインシデント初動調査の自動化を行う AI インシデントコマンダーを作った話
azukiazusa1
1
550
Fluid Templating in TYPO3 14
s2b
0
110
なるべく楽してバックエンドに型をつけたい!(楽とは言ってない)
hibiki_cube
0
130
16年目のピクシブ百科事典を支える最新の技術基盤 / The Modern Tech Stack Powering Pixiv Encyclopedia in its 16th Year
ahuglajbclajep
5
930
実は歴史的なアップデートだと思う AWS Interconnect - multicloud
maroon1st
0
350
GISエンジニアから見たLINKSデータ
nokonoko1203
0
190
rack-attack gemによるリクエスト制限の失敗と学び
pndcat
0
260
.NET Conf 2025 の興味のあるセッ ションを復習した / dotnet conf 2025 quick recap for backend engineer
tomohisa
0
120
AI Agent Dojo #4: watsonx Orchestrate ADK体験
oniak3ibm
PRO
0
130
Featured
See All Featured
Fireside Chat
paigeccino
41
3.8k
Jess Joyce - The Pitfalls of Following Frameworks
techseoconnect
PRO
1
58
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
110
[RailsConf 2023] Rails as a piece of cake
palkan
59
6.3k
Ethics towards AI in product and experience design
skipperchong
2
180
What's in a price? How to price your products and services
michaelherold
247
13k
Designing Dashboards & Data Visualisations in Web Apps
destraynor
231
54k
CoffeeScript is Beautiful & I Never Want to Write Plain JavaScript Again
sstephenson
162
16k
Product Roadmaps are Hard
iamctodd
PRO
55
12k
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
85
Digital Ethics as a Driver of Design Innovation
axbom
PRO
1
150
Organizational Design Perspectives: An Ontology of Organizational Design Elements
kimpetersen
PRO
1
69
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