Skip to content

Commit

Permalink
Update README.md
Browse files Browse the repository at this point in the history
  • Loading branch information
Andrew Walker committed May 20, 2014
1 parent 77c095c commit e1c7de5
Showing 1 changed file with 9 additions and 3 deletions.
12 changes: 9 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,11 +62,15 @@ Use the ``sir_trevor_markdown`` method in your custom block partials to correctl
Use the following methods to query the Sir Trevor content
``@item.content.has_block_of_type?(:image)``
```ruby
@item.content.has_block_of_type?(:image)
```
Does this content have an image block?
``@item.content.first_block_of_type(:video)``
```ruby
@item.content.first_block_of_type(:video)
```
Return the first video block in the content
Expand All @@ -86,7 +90,9 @@ end
Call your method on the ST content
``@item.content.your_custom_method``
```ruby
@item.content.your_custom_method
```
## Generators: Blocks
Expand Down

0 comments on commit e1c7de5

Please sign in to comment.