Quantcast
Channel: Dave Copeland :ruby:
Viewing all articles
Browse latest Browse all 642

Article 3

$
0
0

The lengths Rails goes to to enable this:

```erb
<%= form_for(Widget) do %>
<h1>Inside form</h1>
<% end %>
```

is amazing. It has to subclass Erubi::Engine and override most methods.

Erubi/ERB treat <%= xxx %> as an expression and wrap it in parens `_buf << (xxx)`

Thus, `_buf << (form_for(Widget) do)` is a syntax error by default.

Making something like this work in Erubi on its own is not very easy and so this is a great example of how much work Rails does to provide an ergonomic API.


Viewing all articles
Browse latest Browse all 642

Trending Articles


UPDATE SC IDOL: TWO BECOME ONE


HOY PANGIT, MAGBAYAD KA!


Girasoles para colorear


Presence Quotes – Positive Quotes


Long Distance Relationship Tagalog Love Quotes


Tropa Quotes


“Mali man na ikaw ay ibigin ko, akoy iibig padin sayo”


RE: Mutton Pies (frankie241)


Hato lada ym dei namar ka jingpyrshah jong U JJM Nichols Roy (Bah Joy) ngin...


Two timer Sad tagalog Love quotes


Vimeo 10.7.1 by Vimeo.com, Inc.


Pokemon para colorear


Sapos para colorear


Love Quotes Tagalog


EASY COME, EASY GO


Top 7 Lies of Boys


Re:Mutton Pies (lleechef)


Ka longiing longsem kaba skhem bad kaba khlain ka pynlong kein ia ka...


Vimeo 10.7.0 by Vimeo.com, Inc.


FORECLOSURE OF REAL ESTATE MORTGAGE