Skip to content

Instantly share code, notes, and snippets.

View crawler's full-sized avatar
🇺🇦
Fight

Anton Topchii crawler

🇺🇦
Fight
View GitHub Profile
@crawler
crawler / what_i_serialize.rb
Last active January 10, 2024 16:59
WHAT I SERIALIZE?
# frozen_string_literal: true
###############################################################################################
# WHAT I SERIALIZE? #
###############################################################################################
# This scrip can help you to find what object types you need to witelist after CVE-2022-32224 update
# AD: If you using StimulusJS then checkout my gem stimulus_tag_helper
# https://rubygems.org/gems/stimulus_tag_helper
# https://github.com/crawler/stimulus_tag_helper
# frozen_string_literal: true
module ActiveRecord
module EnumHelpers
extend ActiveSupport::Concern
module ClassMethods
def enum_helpers(name)
module_eval <<-RUBY, __FILE__, __LINE__ + 1
# e.g. order.state_exactly? 'payment'