0

I have two objects that I want my index action to return, but I'm struggling to find the syntax to return them both at the same time.

def index
      last_day_for_jack = Tacobell.where(owner: "Jack")
      last_day_for_pete = Tacobell.where(owner: "Pete")
      render json: { last_day_for_jack last_day_for_pete }
  end
2

0

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.