Skip to content

Commit

Permalink
Merge pull request #438 from georgemillo/builds-readme
Browse files Browse the repository at this point in the history
Fix incorrect example code for 'builds' in README
  • Loading branch information
apotonick committed Jan 7, 2017
2 parents 2462e55 + 9fe7114 commit 6d54b99
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -360,9 +360,13 @@ Builders allow instantiating different cell classes for different models and opt

```ruby
class CommentCell < Cell::ViewModel
include ::Cell::Builder

builds do |model, options|
PostCell if model.is_a?(Post)
CommentCell if model.is_a?(Comment)
case model
when Post; PostCell
when Comment; CommentCell
end
end
```

Expand Down

0 comments on commit 6d54b99

Please sign in to comment.