Created
July 4, 2016 14:51
-
-
Save Koroeskohr/0900796e02f31ac27f8c22bcdd85d7ef to your computer and use it in GitHub Desktop.
Partialify index or show for active admin page
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/views/admin/resource/_attr_table.html.arb | |
context.instance_eval do | |
attributes_table do | |
row :name | |
# ... | |
end | |
end |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# app/admin/resource.rb | |
ActiveAdmin.register resource do | |
show do | |
render 'attr_table', context: self | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment