CRUD API ready
This commit is contained in:
9
app/controllers/concerns/response.rb
Normal file
9
app/controllers/concerns/response.rb
Normal file
@@ -0,0 +1,9 @@
|
||||
module Response
|
||||
def error_response(status)
|
||||
render nothing: true, status: status
|
||||
end
|
||||
|
||||
def json_response(object, status = :ok)
|
||||
render json: object, status: status
|
||||
end
|
||||
end
|
||||
Reference in New Issue
Block a user