Skip to content

Instantly share code, notes, and snippets.

@cmrd-senya
Last active December 3, 2015 13:51
Show Gist options
  • Save cmrd-senya/a87f9b17d4a2eab53640 to your computer and use it in GitHub Desktop.
Save cmrd-senya/a87f9b17d4a2eab53640 to your computer and use it in GitHub Desktop.
It's being called before this line: https://github.com/cmrd-senya/diaspora/commit/9e5cdb13266a001b701a410e946dbca2670731cc#diff-dc587c8c9dfabe96cfbdfd55bb8ac920R43
Here is how I dump:
logger.info("d: #{defined?(super)}")
logger.info("i: #{self.class.instance_methods.include?(__method__)}")
logger.info("i: #{self.class.superclass.instance_methods.include?(__method__)}")
logger.info("#{self} #{self.class} #{self.class.superclass} #{self.class.superclass.superclass}")
logger.info("anc: #{self.class.ancestors}")
logger.info("sup: #{method(:author_signature=).super_method}")
Here is what I have for Participation
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: d:
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: i: true
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: i: true
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: #<Participation:0x00000006b15228> Participation Federated::Relayable ActiveRecord::Base
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: anc: [Participation(id: integer, guid: string, target_id: integer, target_type: string, author_id: integer, author_signature: text, parent_author_signature: text, created_at: datetime, updated_at: datetime, count: integer), ActsAsApi::Base::InstanceMethods, Participation::GeneratedAssociationMethods, #<#<Class:0x00000006b4dcb8>:0x00000006b4dda8>, Federated::Relayable(abstract), Diaspora::Relayable, Diaspora::Encryptable, Diaspora::Guid, Diaspora::Federated::Base::InstanceMethods, ROXML::InstanceMethods, ROXML, Diaspora::Federated::Base, Diaspora::Logging, Federated::Relayable::GeneratedAssociationMethods, #<#<Class:0x00000006c67c48>:0x00000006c67d88>, ActiveRecord::Base, Sidekiq::Extensions::ActiveRecord, GlobalID::Identification, Logging::Rails::Mixin, SimpleCaptcha::ModelHelpers, ActsAsTaggableOn::Tagger, ActiveRecord::Store, ActiveRecord::Serialization, ActiveModel::Serializers::Xml, ActiveModel::Serializers::JSON, ActiveModel::Serialization, ActiveRecord::Reflection, ActiveRecord::NoTouching, ActiveRecord::Transactions, ActiveRecord::Aggregations, ActiveRecord::NestedAttributes, ActiveRecord::AutosaveAssociation, ActiveModel::SecurePassword, ActiveRecord::Associations, ActiveRecord::Timestamp, ActiveModel::Validations::Callbacks, ActiveRecord::Callbacks, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirty, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::AttributeMethods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, ActiveRecord::Base::GeneratedAssociationMethods, #<#<Class:0x00000004cba9e0>:0x00000004cbac88>, ActiveRecord::AttributeMethods, ActiveModel::AttributeMethods, ActiveRecord::Locking::Pessimistic, ActiveRecord::Locking::Optimistic, ActiveRecord::AttributeDecorators, ActiveRecord::Attributes, ActiveRecord::CounterCache, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveSupport::Callbacks, ActiveModel::Validations, ActiveRecord::Integration, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::ForbiddenAttributesProtection, ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, ActiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, ActiveRecord::Core, Object, PP::ObjectMixin, ActiveSupport::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, Kernel, BasicObject]
[2015-12-03T16:47:19] INFO PID-10392 TID-14539120 Participation: sup:
Here is what I have for Comment:
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: d: super
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: i: true
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: i: false
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: #<Comment:0x0000000a5862b8> Comment ActiveRecord::Base Object
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: anc: [Comment(id: integer, text: text, commentable_id: integer, author_id: integer
, guid: string, author_signature: text, parent_author_signature: text, created_at: datetime, updated_at: datetime, likes_count: integer, comme
ntable_type: string), ActsAsTaggableOn::Taggable::Dirty, ActsAsTaggableOn::Taggable::Related, ActsAsTaggableOn::Taggable::Ownership, ActsAsTag
gableOn::Taggable::Cache, ActsAsTaggableOn::Taggable::Collection, #<Module:0x0000000a749050>, ActsAsTaggableOn::Taggable::Core, Diaspora::Like
able, Diaspora::Taggable, Diaspora::Relayable, Diaspora::Encryptable, Diaspora::Guid, Diaspora::Federated::Base::InstanceMethods, ROXML::Insta
nceMethods, ROXML, Diaspora::Federated::Base, Diaspora::Logging, Comment::GeneratedAssociationMethods, #<#<Class:0x0000000a825028>:0x0000000a8
250c8>, ActiveRecord::Base, Sidekiq::Extensions::ActiveRecord, GlobalID::Identification, Logging::Rails::Mixin, SimpleCaptcha::ModelHelpers, A
ctsAsTaggableOn::Tagger, ActiveRecord::Store, ActiveRecord::Serialization, ActiveModel::Serializers::Xml, ActiveModel::Serializers::JSON, Acti
veModel::Serialization, ActiveRecord::Reflection, ActiveRecord::NoTouching, ActiveRecord::Transactions, ActiveRecord::Aggregations, ActiveReco
rd::NestedAttributes, ActiveRecord::AutosaveAssociation, ActiveModel::SecurePassword, ActiveRecord::Associations, ActiveRecord::Timestamp, Act
iveModel::Validations::Callbacks, ActiveRecord::Callbacks, ActiveRecord::AttributeMethods::Serialization, ActiveRecord::AttributeMethods::Dirt
y, ActiveModel::Dirty, ActiveRecord::AttributeMethods::TimeZoneConversion, ActiveRecord::AttributeMethods::PrimaryKey, ActiveRecord::Attribute
Methods::Query, ActiveRecord::AttributeMethods::BeforeTypeCast, ActiveRecord::AttributeMethods::Write, ActiveRecord::AttributeMethods::Read, A
ctiveRecord::Base::GeneratedAssociationMethods, #<#<Class:0x00000004cba9e0>:0x00000004cbac88>, ActiveRecord::AttributeMethods, ActiveModel::At
tributeMethods, ActiveRecord::Locking::Pessimistic, ActiveRecord::Locking::Optimistic, ActiveRecord::AttributeDecorators, ActiveRecord::Attrib
utes, ActiveRecord::CounterCache, ActiveRecord::Validations, ActiveModel::Validations::HelperMethods, ActiveSupport::Callbacks, ActiveModel::V
alidations, ActiveRecord::Integration, ActiveModel::Conversion, ActiveRecord::AttributeAssignment, ActiveModel::ForbiddenAttributesProtection,
ActiveRecord::Sanitization, ActiveRecord::Scoping::Named, ActiveRecord::Scoping::Default, ActiveRecord::Scoping, ActiveRecord::Inheritance, A
ctiveRecord::ModelSchema, ActiveRecord::ReadonlyAttributes, ActiveRecord::Persistence, ActiveRecord::Core, Object, PP::ObjectMixin, ActiveSupp
ort::Dependencies::Loadable, JSON::Ext::Generator::GeneratorMethods::Object, Kernel, BasicObject]
[2015-12-03T16:49:04] INFO PID-10383 TID-14539120 Comment: sup: #<Method: ActiveRecord::Base(#<#<Class:0x0000000a825028>:0x0000000a8250c8>)#a
uthor_signature=(__temp__16574786f627f5379676e61647572756)>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment