Module: ActiveRecord::Serialization
- Defined in:
- lib/ruboss4ruby/active_foo.rb,
lib/ruboss4ruby/active_record_default_methods.rb
Overview
Flex friendly XML serialization patches
Instance Method Summary collapse
- #json_defaults_old_to_json ⇒ Object
- #to_fxml(options = {}, &block) ⇒ Object
- #to_json(options = {}, &block) ⇒ Object
- #to_xml(options = {}, &block) ⇒ Object
- #xml_defaults_old_to_xml ⇒ Object
Instance Method Details
#json_defaults_old_to_json ⇒ Object
31 |
# File 'lib/ruboss4ruby/active_record_default_methods.rb', line 31 alias_method :json_defaults_old_to_json, :to_json |
#to_fxml(options = {}, &block) ⇒ Object
108 109 110 111 112 113 |
# File 'lib/ruboss4ruby/active_foo.rb', line 108 def to_fxml( = {}, &block) .merge!(:dasherize => false) default_except = [:crypted_password, :salt, :remember_token, :remember_token_expires_at] [:except] = ([:except] ? [:except] + default_except : default_except) to_xml(, &block) end |
#to_json(options = {}, &block) ⇒ Object
42 43 44 45 46 47 48 49 |
# File 'lib/ruboss4ruby/active_record_default_methods.rb', line 42 def to_json( = {}, &block) unless [:ignore_defaults] unless [:ignore_default_methods] [:methods] = [[:methods] || []].flatten + (self.class.defaults_hash[:methods] || []) end end json_defaults_old_to_json(, &block) end |
#to_xml(options = {}, &block) ⇒ Object
33 34 35 36 37 38 39 40 |
# File 'lib/ruboss4ruby/active_record_default_methods.rb', line 33 def to_xml( = {}, &block) unless [:ignore_defaults] unless [:ignore_default_methods] [:methods] = [[:methods] || []].flatten + (self.class.defaults_hash[:methods] || []) end end xml_defaults_old_to_xml(, &block) end |
#xml_defaults_old_to_xml ⇒ Object
29 |
# File 'lib/ruboss4ruby/active_record_default_methods.rb', line 29 alias_method :xml_defaults_old_to_xml, :to_xml |