gregbell/active_admin — Issue #984: Add compatibility for content_for
Author: gschammah
Created: 2012-02-07 03:44:32+00:00
State: open

There are many gems that make use of

```ruby
content_for :head do
...
end
```

But those gems cannot be used in active admin since we dont have any layout to put the `yield :head`. It would be nice if Arbre can be compatible with predefined placeholders for some code (e.g. `content_for(:head)`, `content_for(:footer)`, etc).

The way I am injecting code to the layout head is doing `@head << div { ... }` inside my admin partials. This works fine, but I cannot access the `@head` variable from outside my views, for example in a sidebar declaration. I am using the gmaps4rails gem and tried to insert a map into a sidebar, but couldnt inject the dinamically generated js into the layout head.