{"push_id":1580372345,"size":1,"distinct_size":1,"ref":"refs/heads/auto_link_fix_when_belongs_to","head":"67f419a66b1d72a60aae145ade15de3172649f3b","before":"29af8c8bfd8414d80acdec10ff69966f2210b4a7","commits":[{"sha":"67f419a66b1d72a60aae145ade15de3172649f3b","author":{"name":"Igor Fedoronchuk","email":"95b2b881a23f003989bfa1ff55ee4c8676cf1c51@gmail.com"},"message":"fixes #2349, added option to read parent object when belongs_to\n\nAA auto_link method was designed to build links by object automatically,\nhowever in many cases this was inpossible because on activerecord side belongs_to has different options.\nFor instance\n\n```\nclass Post < ActiveRecord::Base\n  belongs_to :author, class_name: 'User'\nend\n```\n\nThen\n\n```\n ActiveAdmin.register User\n ActiveAdmin.register Post { belongs_to :user }\n```\n\nbreaks almost everything  because ActiveAdmin::Router calls post.user instead post.author for reading parent\n\naccidentally activeadmin declares this case as supported for ages (take a look at features/belongs_to.feature)\n\nTo support this we can add just one more option to our belongs_to configuration\n\n```\n ActiveAdmin.register Post { belongs_to :user, method_name: :author }\n```","distinct":true,"url":"https://api.github.com/repos/Fivell/activeadmin/commits/67f419a66b1d72a60aae145ade15de3172649f3b"}]}
{"actor":{"display_login":"Fivell"}}