Consul 1.3.0 lets you override generated controller methods
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