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 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?
Active admin and Pundit
Sortable for has_many does not sort properly
select2 remove tag_list item
Adding Numeric Range Filtering to ActiveAdmin

Categories

HOME
firebase
android-fragments
livecode
bokeh
kendo-dropdown
activex
operating-system
braintree
ant
website
whmcs
swift2
azure-data-lake
dji-sdk
clone
stored-procedures
tiff
mailmerge
amazon-elb
office-ui-fabric
salt-cloud
multiple-tables
anova
conda
channel
restier
background-color
xdebug
marquee
credit-card
intune
memory-fences
series
microsoft-certifications
mongoengine
jslint
cartopy
pyttsx
dagger
react-intl
nusoap
entropy
spring.net
punctuation
stateless-session-bean
wikimapia
predicates
dymola
hmmlearn
openerp-6
elastic4s
rational-performance-test
fuzzer
pyaudio
cdo.message
fragmentstatepageradapter
exists
gravatar
flask-security
json-spirit
android-mapview
smart-tv
apache-commons-digester
canopy
netdatacontractserializer
blockquote
modern.ie
org-babel
text-align
html-escape-characters
sunos
thoughtworks-go
window-resize
inputbox
distributed-r
mfmessagecomposeview
nachos
forceclose
rails-api
roxy-fileman
colon
form-for
insertion
arel
reentrancy
significant-digits
viewpagerindicator
msinfo32
telerik-ajax
server-name
zotonic
kobold2d
series-40
dropshadow
kolite
gwt-celltable
mvcrecaptcha
play2-mini
botnet
nosetests
directshow.net
jmenu
downgrade
eaccelerator
ccl
outlook-2007-addin
3270
iphone-sdk-3.1.3
motif
twitter-feed
chronic
downloadfile

Resources

Mobile Apps Dev
Database Users
javascript
java
csharp
php
android
MS Developer
developer works
python
ios
c
html
jquery
RDBMS discuss
Cloud Virtualization
Database Dev&Adm
javascript
java
csharp
php
python
android
jquery
ruby
ios
html
Mobile App
Mobile App
Mobile App