Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 6644939
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T00:13:34+00:00 2026-05-26T00:13:34+00:00

Rendering a JSON or XML view in rails 3 is straight forward enough. As

  • 0

Rendering a JSON or XML view in rails 3 is straight forward enough. As Hobo does not use views, I cannot work out how to do the same in a hobo project and the docs are not very illuminating. Has anyone done this?

I am using rails 3.0.3 and hobo 1.3.0 pre29

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-26T00:13:34+00:00Added an answer on May 26, 2026 at 12:13 am

    The right solution is:

    def show
        hobo_show do |expects|
          expects.json { render :json => @user.to_json }
          expects.html { hobo_show }
        end
    end
    

    for index:

    def index
        hobo_index do |expects|
          expects.json { render :json => @users.to_json }
          expects.html { hobo_index }
        end
    end
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am rendering a rails partial and I want to alternate the background color
If I'm rendering a regular view in asp.net mvc the only domain object properties
I am actually rendering an excel file in the browser. I use the Response.Writefile(filePath)
I'm not happy with the rendering of HTML by Swing's JEditorPane. In particular bullets
I'm looking at possible approaches to rendering json data received from an Ajax call
I have a spring action that I am rendering some json from the controller,
I've been using JSON to handle AJAX functionality in my rails applications ever since
I use JavaScript for rendering 20 tables of 100 rows each. The data for
I'm new to Play Framework, and having trouble rendering a JSON object. public static
My problem is that the calendar is rendering before the JSON response is sent

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.