RubyFlow The Ruby and Rails community linklog

×

The Ruby and Rails community linklog

Made a library? Written a blog post? Found a useful tutorial? Share it with the Ruby community here or just enjoy what everyone else has found!

active_record_attributes_equality v1.0.0

Released active_record_attributes_equalityust v1.0.0. This gem enhances ActiveRecord::Base#== when comparing two new records, making it look into your attributes hash for a more accurate result.

Ping me if you have any questions or feedback. Best regards,

dbalmeida

Comments

Hey, just a small question: why go through the trouble of creating a module, defining self.included and finally telling ActiveRecord to include it when you could just directly do ActiveRecord::Base.class_eval?

Even though it works both ways, I like to have the code organized. Takes the same time to develop and just looks cleaner ;)

Post a comment

You can use basic HTML markup (e.g. <a>) or Markdown.

As you are not logged in, you will be
directed via GitHub to signup or sign in