-
Notifications
You must be signed in to change notification settings - Fork 21
Open
Labels
Milestone
Description
Curly could have a option to not throw a error, a idea is to behave like i18n, i did a work around this:
# Curly Component
module Curly
ComponentCompiler.class_eval do
def initialize(presenter_class, component, type: nil)
unless presenter_class.component_available?(component.name)
component = Curly::Parser::Component.new('custom_error', nil, {'tag' => 'custom_error'})
end
@presenter_class, @component, @type = presenter_class, component, type
end
end
end# Curly Presenter
def custom_error(tag: nil)
"####{tag}###"
end