Error undefined method `to_key' for [xxx] :Array when trying to use array data on Active Admin table_for (Rails, Postgresql, postgres_ext gem)

后端 未结 1 1310
有刺的猬
有刺的猬 2021-01-24 12:08

I\'d like to have use the data I manage to get inside an array of array to put them inside a table(table_for) on one of my Dashboards on Active Admin

My app is a Daily D

相关标签:
1条回答
  • 2021-01-24 12:51

    I just opened a pull request to add this functionality: https://github.com/gregbell/active_admin/pull/2812

    Which lets you use arbitrary data in a table, like this:

    table_for foo: 1, bar: 2 do
      column :foo
      column :bar
    end
    

    Please give the pull request a try by putting this in your Gemfile:

    gem 'activeadmin', github: 'seanlinsley/active_admin',
                       branch: 'feature/1713-support_arbitrary_objects_for_tables'
    

    UPDATE

    This has now been merged into master:

    gem 'activeadmin', github: 'gregbell/active_admin'
    
    0 讨论(0)
提交回复
热议问题