Google Groups Home
Help | Sign in
Message from discussion Bad response with r_c (xml instead of html)
The group you are posting to is a Usenet group. Messages posted to this group will make your email address visible to anyone on the Internet.
Your reply message has not been sent.
Your post was successful
James Golick  
View profile
 More options May 13, 7:51 am
From: James Golick <jamesgol...@gmail.com>
Date: Tue, 13 May 2008 07:51:42 -0400
Local: Tues, May 13 2008 7:51 am
Subject: Re: Bad response with r_c (xml instead of html)
Which branch are you on?

Sent from my iPhone

On May 13, 2008, at 7:47 AM, Bence Nagy <bence.n...@gmail.com> wrote:

> I get XML output calling 'http://localhost:3000/people' with Internet
> Explorer 7 (IE6 and Firefox works fine) by the following code (git
> version of r_c):

>  index do
>    before do
>      @people = current_user.has_role?('admin') ?
> Person.all.sort_by(&:name) : current_user.people.sort_by(&:name)
>    end
>    wants.html do
>      redirect_to new_person_path if @people.empty?
>    end
>  end

> The command 'formats = :html' after 'index do' solves the problem (I
> am using haml with '!!! Strict' header). Without r_c the code works
> too.

> Greetings, Bence


    Reply to author    Forward  
You must Sign in before you can post messages.
To post a message you must first join this group.
Please update your nickname on the subscription settings page before posting.
You do not have the permission required to post.

Create a group - Google Groups - Google Home - Terms of Service - Privacy Policy
©2008 Google