This commit is contained in:
10
app/controllers/concerns/page_leaf_scoped.rb
Normal file
10
app/controllers/concerns/page_leaf_scoped.rb
Normal file
@@ -0,0 +1,10 @@
|
||||
module PageLeafScoped extend ActiveSupport::Concern
|
||||
included do
|
||||
before_action :set_leaf
|
||||
end
|
||||
|
||||
private
|
||||
def set_leaf
|
||||
@leaf = Current.user.leaves.find(params[:page_id])
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user