Skip to content
This repository has been archived by the owner on Mar 13, 2024. It is now read-only.

Allow local assignment in partials #32

Closed
wants to merge 1 commit into from
Closed

Allow local assignment in partials #32

wants to merge 1 commit into from

Conversation

CDeighton
Copy link

I'm in the middle of upgrading a rails 3 app that uses the original version of this gem. In that version there was support for partial rendering with locals, pretty much in line with standard rails view templates. If you wouldn't mind taking a look across this it could save me a big re-write

@@ -8,11 +8,16 @@ module Partials
# :prawn_object - The object to use for the pdf object in the partial.
# Defaults to the pdf document, but can take a paramenter to render within a prawn object. This
# is good for items like tables, text_blocks, etc.
def partial!(partial_name, prawn_object = pdf)
def partial!(partial_name, prawn_object = pdf, locals: {})
Copy link
Author

Choose a reason for hiding this comment

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

Not sure which ruby versions you want to maintain support for, so this might need to change away from kwarg syntax

@CDeighton CDeighton closed this by deleting the head repository Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

1 participant