table_for
table_for copied to clipboard
undefined method `append_if_string=' for nil:NilClass
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
Could you please try this:
<% column :email do |email| %> <%= mail_to email %> <% end %>
I will try and get back to you. Thanks for the reply.
also maybe this variant:
<% column :email do |email| mail_to email end %>
sorry, i can check it later - have no time at all :(