Skip to content

Instantly share code, notes, and snippets.

View clsechi's full-sized avatar

Carlos Sechi clsechi

View GitHub Profile
# controller.rb
## use response
# With response
def create
# Response.new(success?: false, message: e.message, data: 'ValidationError') => Retorno da Operation
result = call_operation
error_handler(result.error_class, response.message) unless result.success?
call_presenter