[Masterview-devel] It appears that we need to enclose our method calls in parens so ERB can parse complex methods - Re: [Masterview-users] Safer code in rendered output
jeff.barczewski at gmail.com
Thu Oct 12 17:05:44 EDT 2006
On 10/12/06, Deb Lewis <djlewis at acm.org> wrote:
> Jeff - I should probably go through some of the code and some examples
> again, but I think I agree with Ed that our directive implementations should
> be emitting parenthesized fcn call notation.
> I really don't see any downside. It's slightly less declarative looking in
> simple cases, but then this is generated code and correctness is more
> There are cases where the paren-less function notation permitted by Ruby is
> quite nice (all the DSL-style, declarative notations that it enabled), but I
> certainly find for my own coding style that are many situations where the
> more traditional notation with parens seems more approprate.
> While our generated code might use parens that perhaps you'd have omitted if
> writing the equivalent .rhtml by hand, I think anyone reading the output
> will not be confused by the paren notation.
> Nobody should *ever* have to write the sort of markup Ed described:
I fully agree. Just wanted to make sure before I changed all the test cases :-)
Thanks again Ed for bringing this to our attention.
More information about the Masterview-devel