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

make page_size configurable #25

Closed
whysthatso opened this issue Jan 17, 2023 · 4 comments
Closed

make page_size configurable #25

whysthatso opened this issue Jan 17, 2023 · 4 comments

Comments

@whysthatso
Copy link
Contributor

Thanks for this gem of a gem, it makes using prawn so much more reasonable.

is there a way to add page_size as a configurable?

as it is in the initialize function, i'm not sure how to override or configure it best. if you could give me some hints, i might be able to come up with a pr.

@excid3
Copy link
Owner

excid3 commented Jan 17, 2023

We probably need to change this

    def initialize(attributes = {})
      super(page_size: "LETTER")

To:

super(page_size: attributes.delete(:page_size) || "LETTER")

@excid3 excid3 closed this as completed in f6f7f85 Jan 17, 2023
@whysthatso
Copy link
Contributor Author

haha, you're too reactive. i had hoped to twiddle together a nice naive pr :D
thanks.

@excid3
Copy link
Owner

excid3 commented Jan 17, 2023

It turns out that I already had this code on my laptop sitting in git staging from like a month ago and I just had to commit it. 😅

@excid3
Copy link
Owner

excid3 commented Jan 17, 2023

I'm sure there are lots of other improvements to be done, so PRs are welcome!

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

No branches or pull requests

2 participants