1
0
mirror of https://github.com/LaCasemate/fab-manager.git synced 2025-01-18 07:52:23 +01:00

code comments

This commit is contained in:
Sylvain 2019-01-08 09:56:07 +01:00
parent 859544565b
commit d4cddc92fb
3 changed files with 13 additions and 3 deletions

View File

@ -1,3 +1,7 @@
# frozen_string_literal: true
# API Controller for resources of type Abuse.
# Typical action is an user reporting an abuse on a project
class API::AbusesController < API::ApiController
before_action :authenticate_user!, except: :create

View File

@ -1,3 +1,6 @@
# frozen_string_literal: true
# API Controller for resources of type User with role 'admin'.
class API::AdminsController < API::ApiController
before_action :authenticate_user!

View File

@ -1,13 +1,16 @@
# frozen_string_literal: true
# API Controller for resources of type AgeRange
# AgeRange are used in Events
class API::AgeRangesController < API::ApiController
before_action :authenticate_user!, except: [:index]
before_action :set_age_range, only: [:show, :update, :destroy]
before_action :set_age_range, only: %i[show update destroy]
def index
@age_ranges = AgeRange.all
end
def show
end
def show; end
def create
authorize AgeRange