rails/rails — pull request #13235 by strzalek (2013-12-08 21:28:32+00:00)
Title: Inline syntax for variants

In most cases, when setting variant specific code, you're not sharing any code within format.

Inline syntax can vastly simplify defining variants in those situations:

```ruby
respond_to do |format|
format.js { render "trash" }
format.html do |variant|
variant.phone { redirect_to progress_path }
variant.none { render "trash" }
end
end
```

Becomes:

```ruby
respond_to do |format|
format.js { render "trash" }
format.html.phone { redirect_to progress_path }
format.html.none { render "trash" }
end
```

:tropical_drink: