{"version":"1.0","type":"rich","title":"Gist 4469512","description":"This example shows a Rails controller action that handles a user profile page, loading the user’s rental agreements and tools for display. The code uses the `User.find` method to retrieve the user by ID, then calls `set_view_profile` to track the profile view. It queries `RentalAgreement.where` and `Tool.where` to gather associated records. The `respond_to` block serves both HTML and JSON formats via the Rails `render` method. A rescue clause redirects to the same action with a flash notice if any error occurs. The visualization itself is not present; this is purely server-side logic.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4469512?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}