When you use the :as
option to
map a power to a controller method
Show archive.org snapshot
you can now override the generated method. The original implementation can be accessed with super
.
This is useful to chain additional conditions to a scope:
class NotesController < ApplicationController
power :notes, as: :note_scope
# ...
private
def note_scope
super.where(trashed: false)
end
end
Posted by Henning Koch to makandra dev (2023-01-27 15:58)