We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Hey guys. What if I have current user local variable on my controller action?
def index @conversation = Conversation.new(current_user.id, recipient_id_param) render json: @conversation, user: current_user end
def create @message = current_user.messages.create(message_params.merge(recipient_id: recipient_id_param)) render json: @message, status: :created end
def destroy @message = current_user.messages.where(recipient_id: recipient_id_param).find(id_param) @message.destroy render status: :accepted end
Can I set this variable to imitate current user? Like current user = User.find() or User.find_by().
The text was updated successfully, but these errors were encountered:
No branches or pull requests
Hey guys. What if I have current user local variable on my controller action?
Can I set this variable to imitate current user? Like current user = User.find() or User.find_by().
The text was updated successfully, but these errors were encountered: