From 98725c350aac063ac96041f338bcf4b9bdd672b5 Mon Sep 17 00:00:00 2001 From: Paul Bob Date: Tue, 18 Jul 2023 18:15:47 +0300 Subject: [PATCH] fix: actions visible block --- docs/2.0/actions.md | 7 +++---- docs/3.0/actions.md | 7 +++---- 2 files changed, 6 insertions(+), 8 deletions(-) diff --git a/docs/2.0/actions.md b/docs/2.0/actions.md index a63aab2d..42f2157a 100644 --- a/docs/2.0/actions.md +++ b/docs/2.0/actions.md @@ -370,7 +370,7 @@ self.visible = -> { view == :new } self.visible = -> { true } ``` -Inside the visible block you can acces the following variables: +Inside the visible block you can access the following variables: ```ruby self.visible = -> do # You have access to: @@ -378,9 +378,8 @@ Inside the visible block you can acces the following variables: # context # current_user # params - # parent_model - # parent_resource - # resource + # parent_resource (can access the parent_model by parent_resource.model) + # resource (can access the model by resource.model) # view # view_context end diff --git a/docs/3.0/actions.md b/docs/3.0/actions.md index 34b70f40..9f606a90 100644 --- a/docs/3.0/actions.md +++ b/docs/3.0/actions.md @@ -378,7 +378,7 @@ self.visible = -> { view == :new } self.visible = -> { true } ``` -Inside the visible block you can acces the following variables: +Inside the visible block you can access the following variables: ```ruby self.visible = -> do # You have access to: @@ -386,9 +386,8 @@ Inside the visible block you can acces the following variables: # context # current_user # params - # parent_model - # parent_resource - # resource + # parent_resource (can access the parent_record by parent_resource.record) + # resource (can access the record by resource.record) # view # view_context end