1) I have some code in before_dispatch hook which should be executed only for HTML requests. Not for JSON (or even static files). For example I'm prepairing data for layout exactly in this place. How can I do it? 2) I'm prepairing my layout data before the data in the controller (in before_dispatch hook). I have "message count: 18" link. When I open this link, I'm marking all messaged as "read" (in controller). So, this link must have text like this "message count: 0". But it is a not true, because i've marked my messages after prepairing the layout data. So, I should to prepaire data for this link after the controller code. Where can I do it? Maybe before_render hook? 3) I have a lot of legacy code in my project. I can't rework it in short terms. I have a methods who calls another methods who calls another methods. And this last method calls render_error() function. This function should render a template and stop executing all another code. How can I do it?
-- You received this message because you are subscribed to the Google Groups "Mojolicious" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To post to this group, send email to [email protected]. Visit this group at http://groups.google.com/group/mojolicious. For more options, visit https://groups.google.com/groups/opt_out.
