AlchemyCMS/alchemy_cms

View on GitHub
app/components/alchemy/ingredients/boolean_view.rb

Summary

Maintainability
A
0 mins
Test Coverage
A
100%
module Alchemy
  module Ingredients
    class BooleanView < BaseView
      def call
        Alchemy.t(value.to_s, scope: "ingredient_values.boolean").html_safe
      end

      def render?
        !value.nil?
      end
    end
  end
end