cdn/app/components/base.rb
2026-01-30 15:31:20 -05:00

18 lines
515 B
Ruby

# frozen_string_literal: true
class Components::Base < Phlex::HTML
register_value_helper :admin_tool
register_value_helper :current_user
# Include any helpers you want to be available across all components
include Phlex::Rails::Helpers::Routes
include Phlex::Rails::Helpers::ButtonTo
include Phlex::Rails::Helpers::TimeAgoInWords
include Phlex::Rails::Helpers::Pluralize
if Rails.env.development?
def before_template
comment { "Before #{self.class.name}" }
super
end
end
end