1
0
This repository has been archived on 2023-12-07. You can view files and clone it, but cannot push or open issues or pull requests.
body_tracking/app/controllers/body_trackers_controller.rb
2019-08-10 23:31:20 +02:00

18 lines
389 B
Ruby

class BodyTrackersController < ApplicationController
before_action :find_project, only: [:index]
before_action :authorize
def index
end
private
# :find_* methods are called before :authorize,
# @project is required for :authorize to succeed
def find_project
@project = Project.find(params[:project_id])
rescue ActiveRecord::RecordNotFound
render_404
end
end