24 lines
390 B
Ruby
24 lines
390 B
Ruby
class Admins::OrganizationsController < Admins::BaseController
|
|
before_action :finder_org, except: [:index]
|
|
|
|
def index
|
|
@orgs = paginate Organization.all
|
|
end
|
|
|
|
def show
|
|
end
|
|
|
|
def destroy
|
|
@org.destroy!
|
|
Admins::DeleteOrganizationService.call(@org.login)
|
|
render_delete_success
|
|
end
|
|
|
|
private
|
|
|
|
def finder_org
|
|
@org = Organization.find(params[:id])
|
|
end
|
|
|
|
end
|