Hi
I am using rails 1.2.5 And as part of learning rails I just create
a model Person and migrated it (I am following the REST for rails 2
tutorial from peepcode) Then did ./script/generate scaffold Person
Now inside config/routes.rb added map.resources :people
In people controller index action
def index
@person_pages, @people = paginate :people, :per_page => 10
respond_to do |format|
format.html
format.xml { render :xml => @people }
end
end
And also have the view file Now when http://localhost:3000/people
I get the data displayed But when
http://localhost:3000/people.xml I get
XML Parsing Error: unclosed token
Location: http://localhost:3000/people.xml
Line Number 1, Column 1:
could you please tell why this error happens?Also is there
huge differnece in REST for rails 1.2.5 and 2.x
Thanks in advance
Sijo
--
Posted via http://www.ruby-forum.com/.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby
on Rails: Talk" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at
http://groups.google.com/group/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---