Problems setting Content-Type'

0 views
Skip to first unread message

erhan

unread,
Jul 14, 2006, 10:06:40 AM7/14/06
to Rails Ajax Scaffold Generator
Hi,

I am using ajax_scaffold to generate against a model backed by atable
on SQLServer...
It creates all the stuff, and I can list the items in my table... But,
the "Edit" and "Create New" buttons dont work...


The strange thing is that the problem occurs when I edit the
ajax_scaffold generated controller with before_filter/set_charset...


I try to set the charset of pages to ISO-8859-9, then when I hit the
EDIT buton (or Create...), the loading indicator starts spinning
forever and nothing happens.


If I comment out the before_filter call in the controller, edit and
create buttons work... But, this time turkish characters on the page
does not appear...


Any idea?
Thanks in advance...
-------------------------------------------------------------------------------------------------------------

I sollved it, by using another post in this group...
It looks like below....
class ApplicationController < ActionController::Base
before_filter :configure_charsets

def configure_charsets
if request.xhr?
@response.headers["Content-Type"] ||= "text/javascript;
charset=iso-8859-9"
else
@response.headers["Content-Type"] ||= "text/html;
charset=iso-8859-9"
end
end


But, this time another problem occurs... It is again related with
charset...
Look at it at this link :
http://www.google.com/url?sa=D&q=http://groups.google.com.tr/group/ajaxscaffold/browse_thread/thread/88455934677d94d2/1dbf170635ee5ace%3Fhl%3Dtr%231dbf170635ee5ace

Reply all
Reply to author
Forward
0 new messages