Wes Gamble
2006-Apr-17 20:05 UTC
[Rails] render (:action => ''xyz'') in a private controller method
All, I have a controller method (A) which gets called and then delegates some validation to a private validation method (B). This method in turn attempts to call render(:action => ''xyz'') in order to pass control back to the view upon an exception condition. However, it simply completes the method B and returns control to A. So, I take it that render only works inside of a controller method that is directly invoked based on a HTTP request? I guess I can throw exceptions in my private method (B) up to my public controller method (A) and then handle them there? Is that the preferred way to handle this? Thanks, Wes -- Posted via http://www.ruby-forum.com/.
Apparently Analagous Threads
- Does render() have 2 be last statement in controller method?
- Ajax.Request w/standard redirect doesn''t render
- Best way to organize non-controller logic???
- What is wrong with this initialize method (code example)?
- ERb question: Embedding <%= %> in helper method calls