adding the silly hello world controller
This commit is contained in:
@@ -0,0 +1,5 @@
|
||||
class HelloController < ApplicationController
|
||||
def world
|
||||
end
|
||||
|
||||
end
|
2
cookbook/015/01/status/app/helpers/hello_helper.rb
Normal file
2
cookbook/015/01/status/app/helpers/hello_helper.rb
Normal file
@@ -0,0 +1,2 @@
|
||||
module HelloHelper
|
||||
end
|
11
cookbook/015/01/status/app/views/hello/world.html.erb
Normal file
11
cookbook/015/01/status/app/views/hello/world.html.erb
Normal file
@@ -0,0 +1,11 @@
|
||||
<h1>Several increasingly silly ways of displaying “Hello world!”:</h1>
|
||||
|
||||
<p><%= "Hello world!" %></p>
|
||||
<p><%= "Hello" + " world!" %></p>
|
||||
<p><%= w = "world"
|
||||
"Hello #{w}!" %></p>
|
||||
<p><%= 'H' + ?e.chr + ('l' * 2) %><%= ('o word!').gsub('d', 'ld')%></p>
|
||||
|
||||
<% hello = "Hello" %>
|
||||
<% world = "world!" %>
|
||||
<%= hello %> <%= world %>
|
Reference in New Issue
Block a user