FIX: Bad page title for categories view by google crawler

This commit is contained in:
Robin Ward
2015-06-08 12:07:35 -04:00
parent b9938fc969
commit 5da5269652
4 changed files with 10 additions and 3 deletions
@@ -212,6 +212,10 @@ class ApplicationController < ActionController::Base
@guardian ||= Guardian.new(current_user)
end
def current_homepage
current_user ? SiteSetting.homepage : SiteSetting.anonymous_homepage
end
def serialize_data(obj, serializer, opts=nil)
# If it's an array, apply the serializer as an each_serializer to the elements
serializer_opts = {scope: guardian}.merge!(opts || {})