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
68
Accesibilidad Web: Que, como, cuando y por que?
felipecabargas
0
48
Untangling git
felipecabargas
0
71
Docker 101
felipecabargas
1
94
GroupRaise Learning Fridays: UX 101
felipecabargas
0
110
GroupRaise Learning Fridays: Hows and whys of version control
felipecabargas
0
59
Sesion III - Taller RoR LCC
felipecabargas
0
100
Sesion II - Taller RoR LCC
felipecabargas
0
130
Taller RoR LCC
felipecabargas
0
150
Other Decks in Programming
See All in Programming
そこに3びきプロダクトがいるじゃろう——生成AI時代における“価値が届かない理由”の構造
kosuket
0
520
Claude Code全社展開のためにやったことn選~プラグイン302個・コミッター271人を支えるために~
kenchan
5
1.6k
仕様駆動開発へのトライを機に チームに適合する手法を模索し続けている話
freee
PRO
0
580
What's New in Android 2026
veronikapj
0
270
言葉の格闘技のススメ~紙とペンと言葉から始める、キャリアの描き方~
progresscicada
2
160
jsmini JavaScript Engine を作ってみた話
yosuke_furukawa
PRO
0
340
AIが無かった頃の素敵な出会いの話
codmoninc
1
470
全PRの83%がAIレビューだけでマージできるようになった開発組織はその後どうなったか
athug
1
1.9k
GDG Korea Android: 2026 I/O Extended ~ What's new in Android development tools
pluu
0
230
Go言語とトイモデルで学ぶTransformerの気持ち / fukuokago23-transformer
monochromegane
0
190
使いながら育てる Claude Code — 開発フローの1コマンド化 × 繰り返し指摘の自動仕組み化
shiki_kakaku
0
1.9k
freeeにおけるEvalsの実践例の紹介
freee
PRO
0
130
Featured
See All Featured
JavaScript: Past, Present, and Future - NDC Porto 2020
reverentgeek
52
6k
How to Talk to Developers About Accessibility
jct
2
520
Cheating the UX When There Is Nothing More to Optimize - PixelPioneers
stephaniewalter
287
14k
Navigating Team Friction
lara
192
16k
Faster Mobile Websites
deanohume
310
32k
GraphQLとの向き合い方2022年版
quramy
50
15k
Crafting Experiences
bethany
1
260
Dealing with People You Can't Stand - Big Design 2015
cassininazir
367
27k
Being A Developer After 40
akosma
91
590k
B2B Lead Gen: Tactics, Traps & Triumph
marketingsoph
0
220
Discover your Explorer Soul
emna__ayadi
2
1.3k
10 Git Anti Patterns You Should be Aware of
lemiorhan
PRO
659
62k
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' %>