This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# Put in config/initializers/html_sanitizer.rb | |
# | |
# See https://github.com/rails/rails-html-sanitizer/blob/master/lib/rails/html/scrubbers.rb | |
# for more help on how the PermitScrubber works and the functions you can override. | |
class CustomScrubber < Rails::Html::PermitScrubber | |
def initialize | |
super | |
puts("CustomScrubber says hi!") | |
self.tags = %w( script iframe figure figcaption action-text-attachment ) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/helpers/application_helper.rb | |
module ApplicationHelper | |
def declare_fa_icon(options, anchor_name) | |
fa_icon(options, data: { 'fa-symbol': anchor_name }) | |
end | |
def use_fa_icon(anchor_name, text) | |
%Q(<svg class="icon-fa-xs"><use xlink:href="##{anchor_name}"></use></svg>#{text}).html_safe | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MembershipProduct < ApplicationRecord | |
include Sellable | |
# Other stuff... | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
{ | |
"version": 3, | |
"configurePresets": [ | |
{ | |
"name": "configure-base", | |
"hidden": true, | |
"generator": "Ninja", | |
"cacheVariables": { | |
"SERENITY_BUILD_EXAMPLES": "ON", | |
"SERENITY_BUILD_TESTS": "ON" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<canvas | |
data-controller="rive" | |
data-rive-url-value="<%= asset_path("button1.riv") %>" | |
data-rive-state-machines-value="State Machine 1" | |
class="mt-16 w-full aspect-video bg-black" | |
> | |
</canvas> |