Simple Rails Template - PowerPoint PPT Presentation

About This Presentation
Title:

Simple Rails Template

Description:

DOCTYPE html PUBLIC '-//W3C//DTD XHTML 1.0 Strict//EN' ... html xmlns='http://www.w3.org/1999/xhtml' xml:lang='en' lang='en' head ... – PowerPoint PPT presentation

Number of Views:55
Avg rating:3.0/5.0
Slides: 5
Provided by: johnous
Category:
Tags: rails | simple | template | xhtml

less

Transcript and Presenter's Notes

Title: Simple Rails Template


1
Simple Rails Template
lt?xml version"1.0" encoding"utf-8"?gt lt!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http//www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dt
d"gt lthtml xmlns"http//www.w3.org/1999/xhtml"
xmllang"en" lang"en"gt ltheadgt
lttitlegtHello, Userlt/titlegt lt/headgt ltbodygt
ltpgt This page was fetched at lt Time.now()
gt lt/pgt lt/bodygt lt/htmlgt
2
Control Structures in Templates
?xml version"1.0" encoding"utf-8"?gt lt!DOCTYPE
html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
"http//www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dt
d"gt lthtml xmlns"http//www.w3.org/1999/xhtml"
xmllang"en" lang"en"gt ltheadgt
lttitlegtRails Parameterslt/titlegt lt/headgt
ltbodygt ltpgt The ltcodegtparamslt/codegt hash
contains the following values lt/pgt
lt params.each do key, value gt ltpgtlt
key gt lt value gtlt/pgt lt end gt
lt/bodygt lt/ht
3
(No Transcript)
4
Templates
printf("The capital of s is s\n",
state, capital) vs. print("The capital
of) print(state) print(" is ") print(capital)
print("\n")
Write a Comment
User Comments (0)
About PowerShow.com