On Aug 2, 4:12 am, Guo Yangguang <li...@ruby-forum.com> wrote:
> I tested using non-ajax call,but the problem was same,the exception was
> not handled like the attachment and new_variant template was not
> rendered as expected.The render should not be used in the rescue block?
> can you help me?
You're rescuing the exception but then you're re-raising it so your
render call never happens. Also a more usual way is to call save and
test the return value of that rather than call save! and rescue the
exception
Fred
>
> --
> Posted viahttp://www.ruby-forum.com/.
--
You received this message because you are subscribed to the Google Groups "Ruby on Rails: Talk" group.
To post to this group, send email to rubyonrails-talk@googlegroups.com.
To unsubscribe from this group, send email to rubyonrails-talk+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/rubyonrails-talk?hl=en.
No comments:
Post a Comment