gregbell/active_admin — Issue #768: overwrite layout and change the including of CSS and JS
Author: fu-media
Created: 2011-11-21 05:15:35+00:00
State: open

where do i find the layout? i need to customize it due the included javascripts and css are not passing my assets_proc.

i only find
````
render view_factory.layout
````

but i dont know how to look for this.

generally i think there is a wrong way how active_admin includes the JS and CSS

i move my CSS not to public/stylesheets its in public/shared/stylesheets. i have a multidomain project so static.domain.com links in the public/shared/ directoy.
i also have in my applicationcontroller a before_filter
````
def set_asset_host
ActionController::Base.asset_host = Proc.new { |source|
statics = %W(jq.js jqui.js rails.js active_admin.css active_admin_custom.css active_admin.js)

if statics.include?(source.gsub(/\/.*\//, "").gsub(/\?.*/, "")) || source.starts_with?('/images/admin') || source.starts_with?('/images/active_admin/')
"http://static.#{@merchant.domain}"
else
"http://assets.#{@merchant.domain}"
end
}
end
````
and i also registered this filter specially to my active_admin but its not working. active admin always includes
````

````
also it is an interesting point where i can change the sass directory of the generated active_admin css (or better, disable this)

so how to do this?