Action visible block
# avo-2
f
I am looking to show a custom action only for some given models. The doc says:
Copy code
self.visible = -> do
    #   You have access to:
    #   block
    #   context
    #   current_user
    #   params
    #   parent_model
    #   parent_resource
    #   resource
    #   view
    #   view_context
  end
But` self.visible = -> { view == :show && parent_model.user.nil? } ` fails with `undefined local variable or method
parent_model'
l
Hi @future-author-97799, on this commit (https://github.com/avo-hq/avo/commit/95af7dd1299b994ab7d5ff9eda64517a88f81967) we removed the
model
and
parent_model
attribute because it can be accessed like
resource.model
and
parent_resource.model
I missed the documentation part
We'll fix the documentation soon, thanks for the report
I just did a PR to fix the docs https://github.com/avo-hq/avodocs/pull/68
f
Thanks!