Initial commit
This commit is contained in:
13
app/controllers/concerns/location_release_context.rb
Normal file
13
app/controllers/concerns/location_release_context.rb
Normal file
@@ -0,0 +1,13 @@
|
||||
module LocationReleaseContext
|
||||
extend ActiveSupport::Concern
|
||||
|
||||
def location_releases
|
||||
policy_scope(LocationRelease)
|
||||
end
|
||||
|
||||
def set_location_release
|
||||
location_release_id = params[:location_release_id] || params[:id]
|
||||
|
||||
@location_release = authorize location_releases.find(location_release_id)
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user