I have a controller that returns either JSON or partial html depending on if the user is logged in.
Is there anyway to tell the difference once the result has been returned?? What is the best way.
Obviously i have different actions to complete if the response is json or if it is the partial html. With the json one i do a redirect to the login page, and with the html one i just display it. If only i could render the html server side and send it back in json format?? From what i have heard this cannot be done as yet. Thoughts?
Cheers.