table_for icon indicating copy to clipboard operation
table_for copied to clipboard

undefined method `append_if_string=' for nil:NilClass

Open rhnorment opened this issue 13 years ago • 3 comments

No expert here, but I love this gem. Everything works great until I put code inside a column block. Using your sample code:

<%= table_for @users, :html => { :tr => { :class => "row" } }, :stripes => %w{even odd} do -%> <% column :name %> <% column :email do |email| %> <% mail_to email %> <% end %> <% column :company %> <% column :phone %> <% column :created_at, :time_format => "%Y-%m-%d" %> <% end %>

Error occurs on the email column block. What am I doing wrong? Running Ruby 1.9.2 and Rails 3.0.9.

Kind Regards, Hunt

rhnorment avatar Jan 29 '12 19:01 rhnorment

Could you please try this:

<% column :email do |email| %> <%= mail_to email %> <% end %>

lunich avatar Feb 22 '12 17:02 lunich

I will try and get back to you. Thanks for the reply.

rhnorment avatar Feb 22 '12 17:02 rhnorment

also maybe this variant:

<% column :email do |email| mail_to email end %>

sorry, i can check it later - have no time at all :(

lunich avatar Feb 23 '12 10:02 lunich