Update site pages
This commit is contained in:
@@ -1,6 +1,6 @@
|
||||
module ApplicationHelper
|
||||
def title(*args)
|
||||
content_tag :h1 do
|
||||
res = content_tag :h1, class: 'page-title' do
|
||||
if args.first.is_a?(Symbol) && (args[1].respond_to?(:model_name) || args[1].class.respond_to?(:model_name))
|
||||
model = args[1].respond_to?(:model_name) ? args[1] : args[1].class
|
||||
if args.first == :index
|
||||
@@ -12,6 +12,8 @@ module ApplicationHelper
|
||||
args.first
|
||||
end
|
||||
end
|
||||
content_for :page_title, res
|
||||
res
|
||||
end
|
||||
|
||||
# overwrite i18n l, to handle nil values
|
||||
|
||||
Reference in New Issue
Block a user