bsiggelkow/jsonify — pull request #9 by aparod (2011-12-12 18:11:51+00:00)
Title: Syntax improvement for views

I made a small change to make views a little simpler. If a value responds to its key, call that method on the value and use the returned data as the value instead. This helps make the view code a little more DRY. Here's a before and after comparison:

```ruby
# Before
json.users @users do |u|
json.id u.id
json.username u.username
json.first_name u.first_name
json.last_name u.last_name
end

# After
json.users @users do |u|
json.id u
json.username u
json.first_name u
json.last_name u
end
```