initial commit from appmail
This commit is contained in:
@@ -0,0 +1,20 @@
|
||||
module WithinOrganization
|
||||
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
included do
|
||||
helper_method :organization
|
||||
before_action :add_organization_to_page_title
|
||||
end
|
||||
|
||||
private
|
||||
|
||||
def organization
|
||||
@organization ||= current_user.organizations_scope.find_by_permalink!(params[:org_permalink])
|
||||
end
|
||||
|
||||
def add_organization_to_page_title
|
||||
page_title << organization.name
|
||||
end
|
||||
|
||||
end
|
||||
Reference in New Issue
Block a user