74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
|
# File 'lib/ffaker/html_ipsum.rb', line 74
def table(rows = 3)
content_tag_for(:table) do |table|
table << content_tag_for(:thead) do |thead|
thead << content_tag_for(:tr) do |tr|
tr << content_tag_for(:th, word.capitalize)
tr << content_tag_for(:th, word.capitalize)
tr << content_tag_for(:th, word.capitalize)
tr << content_tag_for(:th, word.capitalize)
end
end
table << content_tag_for(:tbody) do |tbody|
rows.times do
tbody << content_tag_for(:tr) do |tr|
tr << content_tag_for(:td, words(1).capitalize)
tr << content_tag_for(:td, words(1).capitalize)
tr << content_tag_for(:td, words(1).capitalize)
tr << content_tag_for(:td, a)
end
end
end
end
end
|