app/components/lookbook/code/component.rb in lookbook-1.3.3 vs app/components/lookbook/code/component.rb in lookbook-1.3.4
- old
+ new
@@ -1,5 +1,7 @@
+require "active_model"
+
module Lookbook
class Code::Component < Lookbook::BaseComponent
include Lookbook::OutputHelper
def initialize(
@@ -53,10 +55,10 @@
@dark
end
def before_render
@theme ||= (config.highlighter_options && config.highlighter_options[:theme]&.to_sym) || :github
- @dark ||= ActiveModel::Type::Boolean.new.cast((config.highlighter_options && config.highlighter_options[:dark]) || false)
+ @dark ||= ::ActiveModel::Type::Boolean.new.cast((config.highlighter_options && config.highlighter_options[:dark]) || false)
end
protected
def alpine_component