mirror of
https://github.com/scinote-eln/scinote-web.git
synced 2024-09-29 11:26:29 +08:00
10 lines
241 B
Ruby
10 lines
241 B
Ruby
module OrganizationsHelper
|
|
# resets the current organization if needed
|
|
def current_organization_switch(org)
|
|
if org != current_organization
|
|
current_user.current_organization_id = org.id
|
|
current_user.save
|
|
end
|
|
end
|
|
end
|