Bad response with r_c (xml instead of html)

0 views
Skip to first unread message

Bence Nagy

unread,
May 13, 2008, 7:47:53 AM5/13/08
to resource_controller
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

James Golick

unread,
May 13, 2008, 7:51:42 AM5/13/08
to resource_...@googlegroups.com
Which branch are you on?

Sent from my iPhone

Bence Nagy

unread,
May 13, 2008, 1:32:10 PM5/13/08
to resource_controller
> Which branch are you on?

It was the automatic_route_discovery branch.

Greetings, Bence

Reply all
Reply to author
Forward
0 new messages