Project

General

Profile

Actions

Feature #8423

open

Redirect to self (action) in MyController

Added by Andriy Lesyuk over 13 years ago. Updated over 13 years ago.

Status:
Reopened
Priority:
Normal
Assignee:
-
Category:
Code cleanup/refactoring
Target version:
-
Start date:
2011-05-23
Due date:
% Done:

0%

Estimated time:
Resolution:
Invalid

Description

Is there any reason for redirecting to :action => 'acount' (the same action) on successful save in MyController's account action?..

I'm adding fields to users form (including one in my contoller) from my plugin. Saving fields with after_filter... When format of fields is invalid due to redirect original form data get lost.

P.S. Do not want to alias account method to avoid conflicts...

Actions #1

Updated by Etienne Massip over 13 years ago

  • Status changed from New to Closed

Redirection to :action => 'account' seems logical to me, what would you expect ?

Try using after_save filter in User instead of using a controller after_filter filter ?

Actions #2

Updated by Etienne Massip over 13 years ago

  • Resolution set to Invalid

You should ask your question in Devlopment forum, this tracker is for bugs or feature requests only.

Actions #3

Updated by Andriy Lesyuk over 13 years ago

Without redirect_to it would render account.rhtml that is actually do the same: I wonder why redirect_to... I expect just rendering account...

Actions #4

Updated by Andriy Lesyuk over 13 years ago

  • Status changed from Closed to Reopened

Reopening for you to note my last comment...

Actions #5

Updated by Etienne Massip over 13 years ago

  • Category set to Code cleanup/refactoring

Red it already ; I'm not sure this redirect is useful, indeed, but I think it's harmless and should not bother you ?

Actions #6

Updated by Andriy Lesyuk over 13 years ago

It does not bother me much... :) But it "limits" me. I guess it could be a typo so that's why reported.

Actions #7

Updated by Etienne Massip over 13 years ago

  • Tracker changed from Defect to Feature
Actions

Also available in: Atom PDF