if you could somehow post the full app (since theres nothing in it) it might be easier for us to debug. Say github.
Also, for the type of testing you're doing, webrat in rails mode works very well. On Jan 9, 6:22 am, Neil <[email protected]> wrote: > Hi all, > > I've noticed that if I try to use ActiveScaffold with JavaScript > turned off (or configure inline = false, or similar), the layout isn't > correctly rendered if the validation fails. > > Setup: > > Rails 2.2.2, latest ActiveScaffold master from github. > > I've set-up a new application from scratch, and ActiveScaffolded the > simplest possible model (a Widget with a name field), and created a > simple application.html.erb layout with the ActiveScaffold includes in > the <head>. > > I then put 'requires_presence_of :name' in the model, and manually > hithttp://localhost:3000/widgets/new(so I bypass the AJAX stuff in this > instance) > > If I then try to create a widget with a blank name, the resultant > error page has no layout applied to it. The same problem happens if > you try to edit a widget (without AJAX) and leave the name blank. > > --- > > The relevant lines appear to be: > vendor/plugins/active_scaffold/lib/active_scaffold/actions/create.rb - > line 50 > vendor/plugins/active_scaffold/lib/active_scaffold/actions/update.rb - > line 45 > > Both do: > render(:action => 'update_form', :layout => true) > > If I manually specify the layout on these lines (:layout => > "application"), it works. Oddly, if I completely remove the :layout > part, just leaving "render :action => 'update_form'", it also works. > > I don't understand the layout engine enough to debug this further, but > it seems strange, as the equivalent :layout => true is scattered > through most of the code, and otherwise seems to render the layout > successfully. > > If anyone has any thoughts or comments, they'd be greatly appreciated. > > Many regards, > Neil. --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "ActiveScaffold : Ruby on Rails plugin" 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/activescaffold?hl=en -~----------~----~----~----~------~----~------~--~---
