-
Notifications
You must be signed in to change notification settings - Fork 444
Open
Labels
Description
Hello! Is there any way to pass a block to a partial? For example like this
json.partial!('member', member: @member) do
json.total_loans(@member.total_loans)
end
In the partial, it looks like this:
json.id member.id
json.type member.class
json.attributes do
json.name member.name
json.date_of_birth member.date_of_birth
yield
end
But it doesn't work. Any ideas?
codergeek121, inkstak and mikerobe