mirror of
https://github.com/openSUSE/osem.git
synced 2026-08-13 19:54:02 +00:00
introduce organizations
This commit is contained in:
parent
bf54487a19
commit
8edf896d86
21 changed files with 345 additions and 4 deletions
19
app/controllers/admin/organizations_controller.rb
Normal file
19
app/controllers/admin/organizations_controller.rb
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
module Admin
|
||||
class OrganizationsController < Admin::BaseController
|
||||
load_and_authorize_resource :organization
|
||||
|
||||
def index
|
||||
@organizations = Organization.all
|
||||
end
|
||||
|
||||
def destroy
|
||||
if @organization.destroy
|
||||
redirect_to admin_organizations_path,
|
||||
notice: 'Organization successfully destroyed'
|
||||
else
|
||||
redirect_to admin_organizations_path,
|
||||
error: 'Organization cannot be destroyed'
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
Loading…
Add table
Add a link
Reference in a new issue