Bug #2335
closedsubmitting a puppet class edit should go back to the class' page
Description
When editing a puppet class, submitting the changes goes back to the list of all classes. This looses the user's context. It would be nice to return to the class itself or the actual page the edit was coming from.
Updated by Sam Kottler almost 12 years ago
- Assignee deleted (
Ohad Levy) - Target version set to 1.2.0
- Difficulty set to trivial
Updated by Greg Sutcliffe over 11 years ago
I can manage a simple redirect back to /puppetclasses/:id/edit easily enough, but that still loses the context of which class/smart variable you were editing. Perhaps Amos or Jospeh can show me a better way than this:
--- a/app/controllers/puppetclasses_controller.rb +++ b/app/controllers/puppetclasses_controller.rb @@ -44,10 +44,12 @@ class PuppetclassesController < ApplicationController def update if @puppetclass.update_attributes(params[:puppetclass]) notice _("Successfully updated puppetclass.") - redirect_to puppetclasses_url - else - render :action => 'edit' end render :action => 'edit' end
Updated by Joseph Magen over 11 years ago
Since there is no show action for puppetclass, I assume you want a redirect to the referrer page.
Updated by Joseph Magen over 11 years ago
- Status changed from New to Ready For Testing
Updated by Dominic Cleal over 11 years ago
We're a bit confused on the PR as to which page it should redirect back to. Would it be the page that originally led you to the class edit page, e.g. the puppet classes list with your search terms and so on, or back to the class edit page itself, as if Submit was just an "Apply" button?
Updated by Joseph Magen over 11 years ago
- Status changed from Ready For Testing to Closed
- % Done changed from 0 to 100
Applied in changeset fb95b3c779953dd59278edd16770fe0384e1e6e9.
Updated by Dominic Cleal over 10 years ago
- Related to Bug #5773: editing resources in UI returns view to wrong page and search added