Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add resource instance variables and audit log sample #2478

Open
wants to merge 1 commit into
base: main
Choose a base branch
from

Conversation

goosys
Copy link

@goosys goosys commented Dec 26, 2023

I have made changes so that instance variables are stored in both the index and create actions, in order to capture controller operation logs and perform other post-processing tasks.
Please review.

@@ -9,6 +9,7 @@ def index
resources = apply_collection_includes(resources)
resources = order.apply(resources)
resources = paginate_resources(resources)
@resources = resources
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should be available through the locals (see lines 14-19). What use case do you have where that's not enough?

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

For consistency. Since I made @requested_resource and @new_resource as instance variables, I made it so that @resources can also be referenced from instance variables.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants