Initial commit
This commit is contained in:
13
app/controllers/concerns/project_context.rb
Normal file
13
app/controllers/concerns/project_context.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module ProjectContext
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def projects
|
||||
policy_scope(Project)
|
||||
end
|
||||
|
||||
def set_project
|
||||
project_id = params[:project_id]
|
||||
|
||||
@project = projects.find(project_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user