2012-05-02 10:18:07 +01:00
|
|
|
class Projects::BaseController < ApplicationController
|
2016-03-22 17:02:49 +00:00
|
|
|
prepend_before_action :find_project
|
2012-05-02 10:18:07 +01:00
|
|
|
|
|
|
|
protected
|
|
|
|
|
2016-03-22 17:02:49 +00:00
|
|
|
def find_project
|
2015-04-03 22:42:25 +01:00
|
|
|
return if params[:name_with_owner].blank?
|
|
|
|
authorize @project = Project.find_by_owner_and_name!(params[:name_with_owner]), :show?
|
2012-05-02 10:18:07 +01:00
|
|
|
end
|
|
|
|
end
|