Anyone? I need the flash message to dispaly "record was submitted" after a Ajax form submit. Hmmm this is really strange as the <error-messages/> works just fine. :/
On Apr 11, 1:47 pm, atmorell <[email protected]> wrote: > Hello, > > The flash[:notice] variable is not generated if hobo_create is called > with Ajax. However <error-messages/> works just fine. > > Any suggestions? > > DRYML: Compiled app/views/layouts/_flash.dryml in 0.76s > > ActionView::TemplateError (no such scoped variable: flash_rendered) on > line #1 of app/views/layouts/_flash.dryml: > 1: <flash-messages/> > > hobo (1.0.0) lib/hobo/dryml/scoped_variables.rb:14:in `[]=' > hobo (1.0.0) lib/hobo/dryml/scoped_variables.rb:34:in > `method_missing' > hobo (1.0.0) taglibs/rapid_pages.dryml:246:in `flash_messages' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:328:in > `_tag_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:248:in > `new_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:248:in > `new_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:328:in > `_tag_context' > hobo (1.0.0) taglibs/rapid_pages.dryml:245:in `flash_messages' > app/views/layouts/_flash.dryml:1:in `render_page' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:267:in > `new_object_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:248:in > `new_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:248:in > `new_context' > hobo (1.0.0) lib/hobo/dryml/template_environment.rb:255:in > `new_object_context' > app/views/layouts/_flash.dryml:1:in `render_page' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:22:in > `render_for_rails22' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:142:in > `render_dryml' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:138:in > `render_dryml' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:106:in `render' > app/views/blogs/create.js:4:in > `_run_app47views47blogs47create46js' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:108:in `render' > hobo (1.0.0) lib/hobo/dryml/template_handler.rb:83:in > `render_for_file' > hobo (1.0.0) lib/hobo/model_controller.rb:818:in `render' > app/controllers/blogs_controller.rb:9:in `create' > hobo (1.0.0) lib/hobo/model_controller.rb:436:in `response_block' > hobo (1.0.0) lib/hobo/model_controller.rb:432:in `response_block' > hobo (1.0.0) lib/hobo/model_controller.rb:569:in `create_response' > hobo (1.0.0) lib/hobo/model_controller.rb:526:in `hobo_create' > app/controllers/blogs_controller.rb:8:in `create' > hobo (1.0.0) lib/hobo/controller.rb:23:in `call' > hobo (1.0.0) lib/hobo/controller.rb:23:in `included_in_class' > > Rendered rescues/_trace (452.2ms) > Rendered rescues/_request_and_response (11.6ms) > Rendering rescues/layout (internal_server_error) > > This is my create action: > > def create > hobo_create do > respond_to do |format| > format.html{ } > format.js > end > end > end > > Is is possible to add the default respond_to block somewhere, so that > I don't have to add the respond_to block to all my controller create > actions? > > Best regards. > Asbjørn Morell -- You received this message because you are subscribed to the Google Groups "Hobo Users" 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/hobousers?hl=en.
