Created
June 16, 2014 17:54
-
-
Save lafave/f36cb68c35cce032758b to your computer and use it in GitHub Desktop.
query_object_execute_concern.rb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# /app/models/concerns/query_object.rb | |
module QueryObject | |
extend ActiveSupport::Concern | |
module ClassMethods | |
# Convenience method to execute a query object. | |
def execute(*args) | |
new(*args).execute | |
end | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment