Last active
December 15, 2015 19:39
-
-
Save dariocravero/5313088 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
module MyApp | |
module CommonViewHelper | |
def self.registered(app) | |
app.helpers Helpers | |
end | |
alias :included :registered | |
module Helpers | |
def page_title(title="") | |
@base_title = "Test Titke" | |
title.blank? ? @base_title : "#{title} | #{@base_title}" | |
end | |
def page_description(description="") | |
description.blank? ? "Test Desc" : truncate(description, length: 160) | |
end | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment