Ajax Scaffold on Rails 1.2.2

0 views
Skip to first unread message

chri...@gmail.com

unread,
Feb 8, 2007, 4:21:46 PM2/8/07
to Ruby On Rails: Ajax Scaffold
I'm experiencing the same problem as mentioned here:
http://blog.caronsoftware.com/articles/2007/01/22/ajaxscaffold-and-rails-1-2-1

The create, and edit won't work, the indicator just keeps spinning and
nothing happens.

I'm using the following versions:

Rails 1.2.2
Prototype 1.5.0
Ajax Scaffolding 3.2.4

I have also tried with Rails 1.2.1 + Prototype 1.5.0_rc0, and tried
applying the patched described in the blogpost above.

Anyone running AS successfully on Rails 1.2.1 with Prototype 1.5.0 ?
What version(combinations?) are you running?


Is there anything else than this version incompatibility that could
cause this problem?

Thanks

rrwhite

unread,
Feb 8, 2007, 5:50:24 PM2/8/07
to Ruby On Rails: Ajax Scaffold
Check to make sure your rico_corner.js file has lines 487-502
commented out.

On Feb 8, 1:21 pm, chril...@gmail.com wrote:
> I'm experiencing the same problem as mentioned here:http://blog.caronsoftware.com/articles/2007/01/22/ajaxscaffold-and-ra...

chri...@gmail.com

unread,
Feb 9, 2007, 11:15:44 AM2/9/07
to Ruby On Rails: Ajax Scaffold
They were already commented out (I think since AS 3.2.4)

chri...@gmail.com

unread,
Feb 9, 2007, 12:15:40 PM2/9/07
to Ruby On Rails: Ajax Scaffold
I found the problem, it was not script related... I had the following
in my Application Controller:

class ApplicationController < ActionController::Base
before_filter :set_charset

def set_charset
@headers["Content-Type"] = "text/html; charset=utf-8"
end

end


But how do I fix the utf-8 encoding if not like this, and so it not
interfere with AS?

rovnak

unread,
Apr 1, 2007, 6:07:49 AM4/1/07
to Ruby On Rails: Ajax Scaffold
I have the same problem. I was chasing my tail for a while before I
found that this was the problem.

I don't understand what is going on with the Ajax Scaffold in this
regard. The problem seems to have been known since last June. Yet,
here it is April, 9 months later, and I am seeing this problem using
all of the latest bits - rails 1.2.3, ajaxscaffold plugin, the latest
everything. And this problem still exists? This is discouraging, I've
spent a few days trying to convert all of my heavily customized AS
generator based things to the AS plugin style just because I thought
the non-functional edit and create actions were related to my move to
rails 1.2.3 and such. Decided to bite the bullet and change to plugin,
even though I am not sure all of my customizations will now work.

But even after the big move, I find the problem persists and only
after further analysis do I find it is ALL related to a simple

@headers["foo"] = "text/html; charset=utf-8"

WTF? How is this incompatible with AS?

rrwhite

unread,
Apr 3, 2007, 7:14:57 AM4/3/07
to Ruby On Rails: Ajax Scaffold
It won't just break AS, it'll break everything you try and return as
Javascript (in our case via RJS templates) since hardcoding it to
'text/html'

see this post:

http://groups.google.com/group/ajaxscaffold/browse_thread/thread/2d97797a2cbbedbd/

But you probably want to use responds_to instead of xhr?

Rich

Reply all
Reply to author
Forward
0 new messages