Sha256: 8d8cbc3177296db12dfb52b37085e7b38ab6faba00e30c429e3a4810376cfb97
Contents?: true
Size: 782 Bytes
Versions: 7
Compression:
Stored size: 782 Bytes
Contents
module RedmineCrm module Patches module LiquidPatch module StandardFilters def self.included(base) base.class_eval do private def to_number(obj) case obj when Float BigDecimal(obj.to_s) when Numeric obj when String (obj.strip =~ /^\d+\.\d+$/) ? BigDecimal(obj) : obj.to_i else 0 end end end end end end end end unless Liquid::StandardFilters.included_modules.include?(RedmineCrm::Patches::LiquidPatch::StandardFilters) Liquid::StandardFilters.send(:include, RedmineCrm::Patches::LiquidPatch::StandardFilters) end
Version data entries
7 entries across 7 versions & 1 rubygems