Commit 2ed892a7 by Đường Sỹ Hoàng

Update module ApplicationHelper

parent 0a6cb10d
# Returns the full title on a per-page basis. # Documentation comment module ApplicationHelper
def full_title(page_title = "" ) # Method def, optional arg
base_title = "Ruby on Rails Tutorial Sample App" # Variable assignment # Returns the full title on a per-page basis.
if page_title.empty? # Boolean test def full_title(page_title = '')
base_title # Implicit return base_title = "Ruby on Rails Tutorial Sample App"
if page_title.empty?
base_title
else else
page_title + " | " + base_title # String concatenation page_title + " | " + base_title
end
end end
end
end end
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment