Created
January 3, 2018 16:49
-
-
Save joegaudet/e355a31031e232bdb313cb791437cdac to your computer and use it in GitHub Desktop.
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
class SomeServiceWithApplyAndCall < CRUD::CreateService | |
def apply(attributes, to_one, to_many, options) | |
self.(attributes[:name], to_one[:foo], to_many[:bar]) | |
end | |
def call(name, foo_id, bar_ids) | |
# the real service stuff | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment