activeadmin/arbre

table_for and an array of hashes

Closed this issue · 2 comments

Not sure if you wrote your own table_for or if you are using someone elses gem, but how would you make something like this work

table_for Professional.subscribed.map {|pro| {name_and_company: pro.name_and_company, number_referrals: pro.referrals.count}} do |pro|
        column ("Name") {|pro| pro[:name_and_company]}
        column ("Referrals") {|pro| pro[:number_referrals]}
      end

Arbre doesn't define table_for. Perhaps you mean Active Admin?

Interesting. The Active Admin documentation indicates that all of the helpers seem to fall under the Arbre gem. Ill post the issue to AA