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

:align => :center is undefined method #122

Open
akkyta opened this issue May 26, 2020 · 0 comments
Open

:align => :center is undefined method #122

akkyta opened this issue May 26, 2020 · 0 comments

Comments

@akkyta
Copy link

akkyta commented May 26, 2020

I am sorry that I am not good at English

I wan't only the first line "text align center" and "bold".
Are these method for "text" only ?

here is my code .

`def content(supporters)

data = [["No", "name", "Email", "create_at"]]
  supporters.each do |f|
    data +=  [["#{f.no}", "#{f.name}", "#{f.email}", "#{f.create_time}"]]
  end
table(data, :column_widths => [40,150,150,120], :position => :center)

end`

If I add

:align => :center

like this
table(data, :column_widths => [40,150,150,120], :position => :center, :align => :center)

then this error happen.

undefined method `align=' for #Prawn::Table:0x00000000307299a0

How can I do "text align center" and "bold" ?

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

No branches or pull requests

1 participant