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-09 12:43:28 +02:00

21 lines
416 B
Ruby

class BodyTrackersController < ApplicationController
before_action :find_project, only: [:index, :units]
before_action :authorize
def index
end
def units
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