activeadmin


ActiveAdmin not decorating show view


I am using ActiveAdmin on my Rails project. I use Draper as decorator but I don't understand why the show view is not decorated. According to the documentation it should be working just adding the decorate_with MyDecorator in my ActiveAdmin resource.
Here is my code:
ActiveAdmin.register Home do
...
decorate_with HomeDecorator
show do
attributes_table do # not being decorated
row :content
row :status
row :image
row :author_with_avatar
end
end
end
Does someone know what is wrong with my code ?
When I've run into this problem, it's because I've customized the controller's find_resource method. In that case be sure to return a manually decorated object:
def find_resource
MyModel.find_by_some_unique_finder(params[:id]).decorate
end
If all else fails you can force it using this approach:
show
attributes_table_for model.decorate do
row :decorator_method
row(:custom_label) { |m| m.decorator_method }
See http://activeadmin.info/docs/6-show-pages.html for more details

Related Links

How to customize site_title_link of active_admin?
rails mountable engine I used rails 4.2.8 and try to install active admin, It's give me error like this
Is it possible to render subscript and superscript in ActiveAdmin pages?
How to make a form row's label into a selection input for a different attribute in ActiveAdmin?
How to use Money filter in active admin?
Can a rubocop check be disabled on certain paths only?
Render plain form html from ActiveAdmin instead of full page
Customize ActiveAdmin Page based on Roles
NoMethodError error for search_methods activeadmin
rails concerns - superclass mismatch error with active_admin in gems list
How to filter by “is not” in active admin/ransack
Active Admin image upload with refile
AuthorizationAdapter in ActiveAdmin
ActiveAdmin and Rails Engine. How do you keep the path name the same?
Active admin defining scope for custom page
ActiveAdmin: Can I redirect the user to the index after they create/edit something?

Categories

HOME
extjs
generics
ontouchlistener
dotnetnuke
systemd
hid
odata
yql
visualforce
linker
minecraft
pyresttest
cisco
selection
jquery-select2-4
feature-extraction
ex
fresco
rpmbuild
scala-ide
gmp
spring-shell
altium-designer
websphere-portal
vuforia
morris.js
python-appium
multi-dimensional-scaling
fatfs
windows2012
spring-rabbitmq
android-canvas
ftp-server
code-rally
selenide
imgur
system-on-chip
transparency
wysihtml5
webalizer
lightning-workbench
embedded-v8
simple-schema
watir-webdriver
htmlspecialchars
word-2007
ptvs
google-shopping-api
fitbit
finder
ipywidgets
e
svnserve
wininet
always-on-top
qtcpsocket
groovyfx
codecharge
facebook-ios-sdk
distributed-cache
verisign
vimperator
okta-api
servicestack-bsd
helm
ruby-on-rails-4.1
lowercase
calcite
knife
dynamics-ax-2012-r2
subview
sunos
visual-studio-6
ecos
aho-corasick
windows-messages
refit
meteor-collections
nodeload
autonumber
application-blocks
stty
django-facebook
google-code-prettify
pacman
sly-scroller
chefspec
cmath
cgrectmake
story
clrprofiler
kaazing
exponent
mmc3
groovy-console
space-partitioning
startupscript
3des
ccnet-config
iphone-sdk-4.3
oracle-pro-c
dm
inversion

Resources

Database Users
RDBMS discuss
Database Dev&Adm
javascript
java
csharp
php
android
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App