rails/rails — pull request #3637 by bogdan (2011-11-15 08:51:44+00:00)
Title: AS::Callbacks::Callback refactor

In order to make Callbacks code always operate on valid peaces of code

Concatenated `Callback#start` and `Callback#end` method into `#apply`
method.

The main concern is around filter. Current implementation of `#start #end` for around filter looks like this:

``` ruby
def start(....)
"#{name}(halted) do"
end
def end(....)
" value
end"
end
```

This is insanely confusing. Now it looks like:

``` ruby
def apply(...)
<<-RUBY_EVAL
#{name}(halted) do
#{code}
value
end
RUBY_EVAL
end
```