Forum: Ruby on Rails [rails 2.3.2] ActionController::DoubleRenderError

Announcement (2017-05-07): www.ruby-forum.com is now read-only since I unfortunately do not have the time to support and maintain the forum any more. Please see rubyonrails.org/community and ruby-lang.org/en/community for other Rails- und Ruby-related community platforms.
Kad K. (Guest)
on 2009-03-29 12:24
(Received via mailing list)
Hi
I don't know how to get rid of this error... I need some help to
understand how to rewrite it
this action is executed from a remote_form  (facebox style), and I
want to keep also the html degraded call

is this issue coming from the close_facebox + redirect_to  ?

  def update
    @auth_source = AuthSource.find(params[:id])
    respond_to do |format|
      if if @auth_source.update_attributes(params[:auth_source])
        flash[:notice] = I18n.t(:notice_successful_update)
        format.html { redirect_to :action => 'list' }
        format.js { close_facebox; redirect_to :controller =>
'settings', :action => 'index', :tab => 'authentification' }
      else
        format.html { render :action => 'edit' }
        format.js { render_to_facebox :partial => "/auth_sources/
edit"}
      end
    end
  end

thanks for your suggestions
Frederick C. (Guest)
on 2009-03-29 13:26
(Received via mailing list)
On Mar 29, 9:24 am, Erwin <removed_email_address@domain.invalid> wrote:
> Hi
> I don't know how to get rid of this error... I need some help to
> understand how to rewrite it
> this action is executed from a remote_form  (facebox style), and I
> want to keep also the html degraded call
>
> is this issue coming from the close_facebox + redirect_to  ?
>
It depends - what's in the close_facebox method? If it is doing a
render or a redirect then yes,

Fred
Kad K. (Guest)
on 2009-03-29 14:55
(Received via mailing list)
Yes , That's the point.. I need to investigate a little bit more...
but I commented the redirect , keeping only the close_facebox and
that's fine !!
thanks for your tip

erwin
This topic is locked and can not be replied to.