what is difference between using concerns vs modules in rails?

It’s well described here: http://api.rubyonrails.org/classes/ActiveSupport/Concern.html

In short:

  • Concerns allow you to use #included and #class_methods instead of self.included hook with additional module ClassMethods creation;

  • Concerns give you a better dependency resolution for modules included in each other;

Leave a Comment

Hata!: SQLSTATE[HY000] [1045] Access denied for user 'divattrend_liink'@'localhost' (using password: YES)