Class: AnimateIt::ApplicationController

Inherits:
ActionController::Base
  • Object
show all
Defined in:
app/controllers/animate_it/application_controller.rb

Constant Summary collapse

NullPolicy =

Host partials reach for Devise's current_user and Pundit's policy(...) helpers. The engine has neither, so provide permissive null-object versions for hero rendering. Hero canvases are always read-only; the action buttons they incidentally render evaluate every permission to false and become no-ops.

Class.new do
  def method_missing(name, *_args)
    name.to_s.end_with?("?") ? false : self
  end

  def respond_to_missing?(_name, _include_private = false)
    true
  end
end