Welcome Guest | Login

Active Scaffold problems

Has anyone used active scaffold on their hostingrails-hosted site? I'm having some strange issues where get requests are returning results on new pages instead of in the div's on the page...the layout also seems to be getting rendered multiple times as a result of some actions. Does anyone have any experience with using active scaffold in this environment? Are there some version issues?

Thanks,
Krister

2007-05-31 12:46 AM

Hi Krister, is this problem occurring on multiple browsers?  Are you on fastCGI or Mongrel?  Is this same version of Active Scaffold working locally for you?

2007-05-31 01:11 AM

Hi. Thanks for the reply.

Yes, this is happening on firefox and IE. This is on Mongrel, and the version does work locally.

2007-05-31 01:13 AM

Ahh ok - and I'm assuming you're on mongrel locally?  With the same version of Rails?  

Can you give me an example view and controller code where the problem happens.  Are "render :layout => false" lines just getting ignored you think?  

2007-05-31 01:17 AM

the code is pretty simple - i haven't customized anything:
this is in the layout head:
<%= javascript_include_tag :defaults %>
<%= active_scaffold_includes %>

and this is in the controller:
active_scaffold :mymodel

It's so odd - it is like the render :layout => false lines are getting ignored, but that must not be the only problem or its a symptom of the main problem - the calls that are supposed to update a div on the page are returning in a new page - for instance, the "create new" is supposed to show a form in a div on the same page, but it takes you to a new page with just that form on it.

2007-05-31 01:31 AM

Hmmm - can you paste in the "show source" html/javascript code for the page ... specifically the Ajax.updater bit.  That will give us a better clue.  Compare that to the html code on your local machine, too, and confirm its the same.

2007-05-31 03:03 AM

aha! if anyone else has this problem, the magical command "rake rails:update:javascripts" did the trick. it works! thanks for the help, william

2007-06-04 01:50 AM


Hello Guest! In order to post you must be an active client with us, please log in or sign up today!