Read more

Consul 1.3.0 lets you override generated controller methods

Henning Koch
January 27, 2023Software engineer at makandra GmbH

When you use the :as option to map a power to a controller method Show snapshot you can now override the generated method. The original implementation can be accessed with super.

Illustration web development

Do you need DevOps-experts?

Your development team has a full backlog? No time for infrastructure architecture? Our DevOps team is ready to support you!

  • We build reliable cloud solutions with Infrastructure as code
  • We are experts in security, Linux and databases
  • We support your dev team to perform
Read more Show snapshot

This is useful to chain additional conditions to a scope:

class NotesController < ApplicationController

  power :notes, as: :note_scope

  # ...
  def note_scope
    super.where(trashed: false)

Posted by Henning Koch to makandra dev (2023-01-27 16:58)