> How about a helper:
>
> %p= error_helper(error)
>
> def pre_code
> open(:pre) do
> open(:code) do
> yield
> end
> end
> end
>
> def error_helper(error)
> pre_code{puts error.backtrace.join("\n")}
> end
>
> I haven't tested this, but it should oughta work, and you can user
> pre_code for any other plain-text stuff you want.
>
> Thoughts?
That's kinda what I meant by "I don't want to clutter up
my execution context with a pre_code_tag method."
The helper method has to go somewhere, and in this case, in order to
gain access to the error value, I had to set the execution context to
my ErrorController. This means that I would have to add the
pre_code_tag method to the ErrorController. This would be inelegant
at best. (Note again, this is not being used within Rails. Any
resemblance between my use of a Controller and Rails' way of doing
things is purely coincidental.)
Bob.
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Haml" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at http://groups.google.com/group/haml?hl=en
-~----------~----~----~----~------~----~------~--~---