vigetlabs / active_admin_associations

This extends ActiveAdmin to allow for better editing of associations.
MIT License
119 stars 55 forks source link

Overriding templates #3

Closed mscifo closed 12 years ago

mscifo commented 12 years ago

How can I override the default templates without editing them inside the gem?

I've created app/views/admin/RESOURCE_NAME/_form.html.erb and app/views/admin/RESOURCE_NAME/_collection_table.html.erb.

I can see that it's using my _form.html.erb, but any changes I've made to my _collection_table.html.erb are not taking affect.

brianjlandau commented 12 years ago

You can override the whole form template on a per resource level like you mention above if you put form :partial => 'form' in your AA resource

You can override _collection_table.html.erb for the whole app by creating a file at app/views/admin/shared/_collection_tabe.html.erb inside your own app, however you can't do this at the individual resource level.

brianjlandau commented 12 years ago

Closing, please respond if you still have questions.