Skip to content

Commit 6a8da1f

Browse files
adding ruby tag to code blocks
1 parent 5587699 commit 6a8da1f

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

docs/general/passing_arbitrary_options.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
Let's say you have a basic Post Controller:
44

5-
```
5+
```ruby
66
class PostController < ApplicationController
77
def dashboard
88
render json: @posts
@@ -12,7 +12,7 @@ end
1212

1313
Odds are, your serializer will look something like this:
1414

15-
```
15+
```ruby
1616
class PostSerializer < ActiveModel::Serializer
1717
attributes :id, :title, :body
1818
end
@@ -23,7 +23,7 @@ into the serializer. Here's what you would do:
2323

2424
### posts_controller.rb
2525

26-
```
26+
```ruby
2727
...
2828
def dashboard
2929
render json: @posts, user_id: 12
@@ -33,7 +33,7 @@ into the serializer. Here's what you would do:
3333

3434
### posts_serializer.rb
3535

36-
```
36+
```ruby
3737
...
3838
def comments_by_me
3939
Comments.where(user_id: instance_options[:user_id], post_id: object.id)

0 commit comments

Comments
 (0)