Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactoring the ruby code #18

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

prashant-shekhar
Copy link
Contributor

@prashant-shekhar prashant-shekhar commented Jan 15, 2021

@prashant-shekhar prashant-shekhar force-pushed the refactoring-the-ruby-code branch from 21a6840 to ca9cb31 Compare January 15, 2021 15:38
user = User.find(params[:userid])
emails = user.emails
render json: emails
emails = @logged_in_user.emails
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Where did @logged_in_user variable come from? where is it defined?

@@ -1,17 +1,22 @@
class Api::V1::UploadsController < ApplicationController
def index
user = User.find(params[:userid])
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what if the user record does not exist and you get a RecordNotFound exception? where are you handling it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants