class UserService
service :signup do |config|
config.required do end
config.optional do end
config.execute
# signup stuff here
end
end
service :delete_account do |config|
config.required do end
config.optional do end
config.execute
# signup stuff here
end
end
end
This would also make it possible to do service description and even expose a json or xml api using just this.But I guess the controllers are created for this. DHH says controllers are responsible for mailing and stuff, which is more correct than in the models with callbacks.