Added project menu, body_trackers#index and sidebar
This commit is contained in:
@@ -1,5 +1,17 @@
|
||||
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
|
||||
|
||||
Reference in New Issue
Block a user