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
Rails Bootcamp [Sesión 04, 05]
Search
A. Felipe Cabargas Madrid
June 11, 2016
Programming
140
0
Share
Embed
Copy iframe code
Copy JS code
Copy link
Start on current slide
Rails Bootcamp [Sesión 04, 05]
A. Felipe Cabargas Madrid
June 11, 2016
More Decks by A. Felipe Cabargas Madrid
See All by A. Felipe Cabargas Madrid
Layers Layers Layers
felipecabargas
0
66
Accesibilidad Web: Que, como, cuando y por que?
felipecabargas
0
41
Untangling git
felipecabargas
0
65
Docker 101
felipecabargas
1
92
GroupRaise Learning Fridays: UX 101
felipecabargas
0
110
GroupRaise Learning Fridays: Hows and whys of version control
felipecabargas
0
57
Sesion III - Taller RoR LCC
felipecabargas
0
98
Sesion II - Taller RoR LCC
felipecabargas
0
130
Taller RoR LCC
felipecabargas
0
150
Other Decks in Programming
See All in Programming
これからAgentCoreを触る方へトレンドはGatewayです
har1101
6
500
AI 輔助遺留系統現代化的經驗分享
jame2408
1
1.2k
act1-costs.pdf
sumedhbala
0
240
ビデオ通話が繋がる0.2秒で何が起きているのか
supurazako
2
150
act2-costs.pdf
sumedhbala
0
120
JAWS-UG横浜 #102 AWSサ終供養LT会 成仏できない AWS サービスたち 〜本日、三体供養します〜
maroon1st
0
220
Claude Opus 4.6以後の受託開発エンジニアの変化(Claude Code開発ノウハウ大公開スペシャルbyクラスメソッド)
iidatakuma
1
820
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
0
160
SREは、MCPとSRE Agentをこう使え!
kazumax55
0
150
吝嗇家のためのAI活用 / AI development for miser - ChatGPT + Issue Driven Development
tooppoo
0
190
なぜ型を書くのか? TSKaigi2026で改めて考える #tskaigi_smarthr
kajitack
0
390
琵琶湖の水は止められてもNet--HTTPのリトライは止められない / You might be able to stop the water flow of Lake Biwa but you can't stop Net::HTTP retries
luccafort
PRO
0
410
Featured
See All Featured
Deep Space Network (abreviated)
tonyrice
0
230
Ruling the World: When Life Gets Gamed
codingconduct
0
290
The Myth of the Modular Monolith - Day 2 Keynote - Rails World 2024
eileencodes
28
3.6k
Why Our Code Smells
bkeepers
PRO
340
58k
Claude Code のすすめ
schroneko
67
230k
Accessibility Awareness
sabderemane
1
160
DevOps and Value Stream Thinking: Enabling flow, efficiency and business value
helenjbeal
1
260
Art, The Web, and Tiny UX
lynnandtonic
304
22k
Max Prin - Stacking Signals: How International SEO Comes Together (And Falls Apart)
techseoconnect
PRO
0
320
How to Get Subject Matter Experts Bought In and Actively Contributing to SEO & PR Initiatives.
livdayseo
0
150
AI Search: Implications for SEO and How to Move Forward - #ShenzhenSEOConference
aleyda
1
1.3k
Navigating Team Friction
lara
192
16k
Transcript
RAILS BOOTCAMP 4 JUNIO 2016
ACTIONVIEW ACTIONCONTROLLER
Datos del Modelo a la Vista: Controladores
app/controller/home_controller.rb class HomeController < ApplicationController def index @nombre = "Felipe"
@people = Person.all end end
La “pagina web”: Vistas
$ rails generate scaffold Person
/app/views/person
ERB
erb-loud
<%= @person.first.name %>
erb-silent
<% @person.each do |p| %> <% end %> Se utiliza
en ciclos u otro código que no se expondrá al usuario
Partials
$ touch app/views/layouts/ _navbar.html.erb
<h1> Hola <% if @nombre.nil? %> Mundo <% else %>
<%= @nombre %> <% end %> </h1> <hr>
<%= render 'layouts/navbar' %>
Asset Pipeline
LINKS <%= link_to 'Nuevo Post', new_post_path, class: ['hola', 'mundo'] %>
<%= link_to 'Posts', posts_url, id: 'mundo' %> <%= link_to 'Google', 'http://google.com' %> IMAGENES <%= image_tag 'leyton.jpg' %> CSS/JS (SASS/COFFEESCRIPT) <%= stylesheet_link_tag 'application', media: 'all', 'data-turbolinks- track' => true %> <%= javascript_include_tag 'application', 'data-turbolinks-track' => true %>
Una vista completa
<%= render 'layouts/navbar' %> <ul> <% @people.each do |var|%> <li>
<%= image_tag 'leyton.jpg' %> <strong><%= var.name %></strong> <p><%= var.email %></p> </li> <% end %> </ul> <% # RELATIVA %> <%= link_to 'Nuevo Post', new_post_path, class: ['hola', 'mundo'] %> <% # URL COMPLETA %> <%= link_to 'Posts', posts_url, id: 'mundo' %> <% # EXTERNA %> <%= link_to 'Google', 'http://google.com' %>