> Any ideas to improve this?
> 
> Bart
Hi Bart!

I was writing an answer while you have added yours.
I can still publish it as a general suggestion. Here it is:

"...
I don't have a final solution there, but rather a small suggestion:

avoid the if/else construct and just set the
  session['return-to'] ||= '/your_controller/list'
as default.

In this way you just
redirect_to session['return-to']
whenever you need it. It scales better, doesn't
matter how many new spacial cases you want to introduce.
..."

About the DRYness I create a new POST so that we don't confuse the Riki 
specific issue to the genear problem.

See you in the new post ;-)

Mauro

-- 
Posted via http://www.ruby-forum.com/.
_______________________________________________
engine-users mailing list
[email protected]
http://lists.rails-engines.org/listinfo.cgi/engine-users-rails-engines.org

Reply via email to