Skip to content

Not redirecting to show page after successful create / update #6

@lucaspiller

Description

@lucaspiller

This could very well be me just not reading the docs fully, but I have spend quite a while and can't find anything.

I have a resource that doesn't require a show page (at least for HTML - which is all I care about at the moment), as such, after a create and update I want to redirect back to the parent object's show page.

I have tried adding the following, however even if the action is not successful they are still redirected. Is there anyway around this?

response_for :create, :update do
  redirect_to campaign_path(parent_object.id)
end

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions