Skip to content

Instantly share code, notes, and snippets.

@benoittgt
Created November 14, 2018 14:50
def respond_to?(name, include_private = false)
return false unless super
case name
when :to_partial_path
name = "to_partial_path".freeze
when :to_model
name = "to_model".freeze
else
name = name.to_s # ◀️◀️◀️◀️◀️ here
end
#...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment