Skip to content

Commit a54c73c

Browse files
committed
Remove unrelated comments
1 parent c4bcfdd commit a54c73c

2 files changed

Lines changed: 2 additions & 18 deletions

File tree

app/controllers/administrate/application_controller.rb

Lines changed: 0 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -201,19 +201,10 @@ def requested_resource
201201
end
202202
end
203203

204-
# Override this method to specify custom lookup behavior.
205-
# This will be used to set the resource for the `show`, `edit`, `update` and `destroy` actions.
206-
#
207-
# @param param [ActiveSupport::Parameter]
208-
# @return [ActiveRecord::Base]
209204
def find_resource(param)
210205
scoped_resource.find(param)
211206
end
212207

213-
# Override this if you have certain roles that require a subset.
214-
# This will be used in all actions except for the `new` and `create` actions.
215-
#
216-
# @return [ActiveRecord::Relation]
217208
def scoped_resource
218209
resource_class.default_scoped
219210
end
@@ -289,13 +280,6 @@ def new_resource(params = {})
289280
end
290281
helper_method :new_resource
291282

292-
# Override this if you want to authorize the resource differently.
293-
# This will be used to authorize the resource for the all actions without `index`.
294-
# In the case of `index`, it is used to authorize the resource class.
295-
#
296-
# @param resource [ActiveRecord::Base]
297-
# @return [ActiveRecord::Base]
298-
# @raise [Administrate::NotAuthorizedError] if the resource is not authorized.
299283
def authorize_resource(resource)
300284
if authorized_action?(resource, action_name)
301285
resource

docs/customizing_controller_actions.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,8 @@ class Admin::FoosController < Admin::ApplicationController
2323
# send_foo_updated_email
2424
# end
2525

26-
# Override this method to specify custom lookup behavior.
27-
# This will be used to set the resource for the `show`, `edit`, `update` and `destroy` actions.
26+
# This will be used to set the resource for the `show`, `edit`, and `update`
27+
# actions.
2828
#
2929
# def find_resource(param)
3030
# Foo.find_by!(slug: param)

0 commit comments

Comments
 (0)