-
Notifications
You must be signed in to change notification settings - Fork 13
/
htmlErb.html.erb
executable file
·62 lines (48 loc) · 1.08 KB
/
htmlErb.html.erb
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
===================
Guía html.erb by dM
===================
<!-- ##### Ejemplos: ##### -->
example.erb:
<section class="container">
<h1><%= post.title %></h1>
<h2><%= post.subtitle %></h2>
<div class="content">
<%= post.content %>
</div>
</section>
example.haml:
%section.container
%h1= post.title
%h2= post.subtitle
.content
= post.content
---------
example.erb:
<strong><%= item.title %></strong>
example.haml:
%strong= item.title
---------
example.html
<strong class="code" id="message">Hello, World!</strong>
example.haml
%strong{:class => "code", :id => "message"} Hello, World!
---------
example.erb
<div id='content'>
<div class='left column'>
<h2>Welcome to our site!</h2>
<p><%= print_information %></p>
</div>
<div class="right column">
<%= render :partial => "sidebar" %>
</div>
</div>
example.haml
#content
.left.column
%h2 Welcome to our site!
%p= print_information
.right.column
= render :partial => "sidebar"
<!-- ##### Otros ##### -->
<%= link_to "proyecto", proyecto_path%> // Enlace al path de otro controlador.