mirror of
https://0xacab.org/sutty/sutty
synced 2025-02-23 20:31:49 +00:00
Merge branch 'rails' into production.panel.sutty.nl
This commit is contained in:
commit
d65bc78622
1 changed files with 18 additions and 1 deletions
|
@ -7,6 +7,23 @@ class ApplicationRecord < ActiveRecord::Base
|
|||
#
|
||||
# @return [String]
|
||||
def to_yaml(options = {})
|
||||
self.class.inspection_filter.filter(serializable_hash).to_yaml(options)
|
||||
pruned_attributes.to_yaml(options)
|
||||
end
|
||||
|
||||
# Devuelve todos los atributos menos los filtrados
|
||||
#
|
||||
# @return [Hash]
|
||||
def pruned_attributes
|
||||
self.class.inspection_filter.filter(serializable_hash)
|
||||
end
|
||||
|
||||
# @param coder [Psych::Coder]
|
||||
# @return nil
|
||||
def encode_with(coder)
|
||||
pruned_attributes.each_pair do |attr, value|
|
||||
coder[attr] = value
|
||||
end
|
||||
|
||||
nil
|
||||
end
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue