scinote-web/app/helpers/organizations_helper.rb
2016-10-17 15:10:26 +02:00

10 lines
243 B
Ruby

module OrganizationsHelper
def current_organization_switch(org)
# resets the current organization if needed
if org != current_organization
current_user.current_organization_id = org.id
current_user.save
end
end
end