Method: Alchemy::ElementEditor#respond_to?

Defined in:
app/decorators/alchemy/element_editor.rb

#respond_to?(*args, **kwargs) ⇒ Boolean

Fixes Rails partial renderer calling to_model on the object which reveals the delegated element instead of this decorator.

Returns:

  • (Boolean)


73
74
75
76
77
78
# File 'app/decorators/alchemy/element_editor.rb', line 73

def respond_to?(*args, **kwargs)
  method_name = args.first
  return false if method_name == :to_model

  super
end