if you use active_support you can do it this way http://api.rubyonrails.org/classes/ActiveSupport/Concern.html It does the same what you did in this method, but in case of using active_support you need to write less code.