flyerhzm/rails_best_practices — Issue #67: Simplify render in views
Author: styx
Created: 2011-10-18 12:58:31+00:00
State: open

This one http://rails-bestpractices.com/posts/61-simplify-render-in-views has a bad check. If we have :collection/:object then such a render can't be optimised.

For i.e.

```ruby
= render partial: "shared/bin", collection: Binary.find_last_20
```

can't be optimised as

```ruby
= render "shared/bin", collection: Binary.find_last_20
```
or
```ruby
= render "shared/bin", Binary.find_last_20
```

but the tool reports about this line.