مراية لـ
https://github.com/postalserver/postal.git
تم المزامنة 2025-12-01 05:43:04 +00:00
initial commit from appmail
هذا الالتزام موجود في:
0
app/controllers/concerns/.keep
Normal file
0
app/controllers/concerns/.keep
Normal file
20
app/controllers/concerns/within_organization.rb
Normal file
20
app/controllers/concerns/within_organization.rb
Normal file
@@ -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
|
||||
المرجع في مشكلة جديدة
حظر مستخدم