move set_header_data back into application_controller
This commit is contained in:
parent
e882dedd33
commit
052690941b
2 changed files with 7 additions and 7 deletions
|
|
@ -24,6 +24,13 @@ class ApplicationController < ActionController::Base
|
||||||
:tags,
|
:tags,
|
||||||
:open_publisher
|
:open_publisher
|
||||||
|
|
||||||
|
def set_header_data
|
||||||
|
if user_signed_in? && request.format.html? && !params[:only_posts]
|
||||||
|
@notification_count = Notification.for(current_user, :unread =>true).count
|
||||||
|
@unread_message_count = ConversationVisibility.sum(:unread, :conditions => "person_id = #{current_user.person.id}")
|
||||||
|
end
|
||||||
|
end
|
||||||
|
|
||||||
def ensure_http_referer_is_set
|
def ensure_http_referer_is_set
|
||||||
request.env['HTTP_REFERER'] ||= '/aspects'
|
request.env['HTTP_REFERER'] ||= '/aspects'
|
||||||
end
|
end
|
||||||
|
|
|
||||||
|
|
@ -4,13 +4,6 @@
|
||||||
|
|
||||||
module ApplicationHelper
|
module ApplicationHelper
|
||||||
|
|
||||||
def set_header_data
|
|
||||||
if user_signed_in? && request.format.html? && !params[:only_posts]
|
|
||||||
@notification_count = Notification.for(current_user, :unread =>true).count
|
|
||||||
@unread_message_count = ConversationVisibility.sum(:unread, :conditions => "person_id = #{current_user.person.id}")
|
|
||||||
end
|
|
||||||
end
|
|
||||||
|
|
||||||
def how_long_ago(obj)
|
def how_long_ago(obj)
|
||||||
timeago(obj.created_at)
|
timeago(obj.created_at)
|
||||||
end
|
end
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue