-
Notifications
You must be signed in to change notification settings - Fork 0
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
Override field size #38
Comments
This worked for me, in this initializer (underneath everything already there, leaving that untouched): include PrawnRailsForms::DocumentExtensions
def make_field_box(field)
# your code with a custom size
end Let me know if that works and I'll close out this issue. |
Can you clarify what you mean by, "increase the field size"? It looks like what you're trying to do here is increase the font size of the label, this text: There are built-in ways to increase the row height (via the That said, monkey-patching our module does appear to work: PrawnRailsForms::DocumentExtensions.module_eval do
def make_field_box(field)
stroke_bounds
bounds.add_left_padding 2
move_down 2
text field.upcase, size: 14
end
end Just be advised:
|
I actually copied the whole DocumentExtensions to make it work, starting with
|
Yes you are right. The font size ( |
Any idea how to override the method below to increase the field size in my rails application?
I tried this in config/initializers/prawn_rails.rb but it is not working as expected.
The text was updated successfully, but these errors were encountered: