{"version":"1.0","type":"rich","title":"Gist 4469598","description":"This example shows a Rails controller action that retrieves a user’s profile, rental agreements, and tools from a database, then renders the user as HTML or JSON. The code uses ActiveRecord queries (`User.find`, `RentalAgreement.where`, `Tool.where`) and a `respond_to` block to serve the requested format. It also calls `set_view_profile` to update a view counter. The rescue block prints a backtrace to the console but does not provide a user-facing error message, leaving the default error handling in place.","provider_name":"VizHub AI Studio","provider_url":"https://next.vizhub.com","html":"<iframe src=\"https://next.vizhub.com/viz/gist-4469598?mode=embed\" width=\"960\" height=\"500\" scrolling=\"no\" frameborder=\"1\"></iframe>","width":960,"height":500,"cache_age":3600}