{"action":"created","issue":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5329","repository_url":"https://api.github.com/repos/activeadmin/activeadmin","labels_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5329/labels{/name}","comments_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5329/comments","events_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5329/events","html_url":"https://github.com/activeadmin/activeadmin/issues/5329","id":291161128,"node_id":"MDU6SXNzdWUyOTExNjExMjg=","number":5329,"title":"proc{xxx} in Filter.label is not executed in Search Status sidebar","user":{"login":"xhero","id":1691778,"node_id":"MDQ6VXNlcjE2OTE3Nzg=","avatar_url":"https://avatars2.githubusercontent.com/u/1691778?v=4","gravatar_id":"","url":"https://api.github.com/users/xhero","html_url":"https://github.com/xhero","followers_url":"https://api.github.com/users/xhero/followers","following_url":"https://api.github.com/users/xhero/following{/other_user}","gists_url":"https://api.github.com/users/xhero/gists{/gist_id}","starred_url":"https://api.github.com/users/xhero/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/xhero/subscriptions","organizations_url":"https://api.github.com/users/xhero/orgs","repos_url":"https://api.github.com/users/xhero/repos","events_url":"https://api.github.com/users/xhero/events{/privacy}","received_events_url":"https://api.github.com/users/xhero/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":1,"created_at":"2018-01-24T10:42:45Z","updated_at":"2018-09-28T15:58:38Z","closed_at":"2018-09-28T15:58:38Z","author_association":"NONE","body":"I've been researching this for a couple days now and did not find any other indications, sorry it is it a dup.\r\nI just updated to AA 1.2.0 from 1.1.0. I have many filters with custom labels and i18n, the all look more or less like this:\r\n\r\n```ruby\r\nfilter :updated_at, :label => proc{I18n.t(:updated_at)}, as: :date_range\r\n```\r\nI use `proc{xxx}` because the user can select the language from a menu and needs to be re-evaluated (It is still in the docs so I hope it is still the correct way).\r\n\r\nIn the filters sidebar, the element pops up correctly with the correct label, In the \"Search Status\" it always displays as `#<Proc:0x007fb6bf2eb3f0@...etc>`\r\n\r\nIm not sure why. I looked into `ActiveAdmin::Filters::ActiveFilter` and indeed the label is just cast to a string without executing the proc. I'm unsure why in the Filters it is OK since I could not trace that.\r\n\r\nI made a small patch to ActiveFilter so the proc gets executed and it works, but I'm unsure this is the right way to do it:\r\n\r\n```ruby\r\n      def filter_label\r\n        return unless filter\r\n\r\n        if filter[:label].is_a? Proc\r\n          filter[:label].call\r\n        else\r\n          filter[:label]\r\n        end\r\n      end\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/activeadmin/activeadmin/issues/comments/425482572","html_url":"https://github.com/activeadmin/activeadmin/issues/5329#issuecomment-425482572","issue_url":"https://api.github.com/repos/activeadmin/activeadmin/issues/5329","id":425482572,"node_id":"MDEyOklzc3VlQ29tbWVudDQyNTQ4MjU3Mg==","user":{"login":"varyonic","id":780081,"node_id":"MDQ6VXNlcjc4MDA4MQ==","avatar_url":"https://avatars3.githubusercontent.com/u/780081?v=4","gravatar_id":"","url":"https://api.github.com/users/varyonic","html_url":"https://github.com/varyonic","followers_url":"https://api.github.com/users/varyonic/followers","following_url":"https://api.github.com/users/varyonic/following{/other_user}","gists_url":"https://api.github.com/users/varyonic/gists{/gist_id}","starred_url":"https://api.github.com/users/varyonic/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/varyonic/subscriptions","organizations_url":"https://api.github.com/users/varyonic/orgs","repos_url":"https://api.github.com/users/varyonic/repos","events_url":"https://api.github.com/users/varyonic/events{/privacy}","received_events_url":"https://api.github.com/users/varyonic/received_events","type":"User","site_admin":false},"created_at":"2018-09-28T15:58:38Z","updated_at":"2018-09-28T15:58:38Z","author_association":"MEMBER","body":"I’m going to close this since you haven’t responded.  Please feel free to leave a comment requesting this issue be reopened if needed."}}
{"actor":{"display_login":"varyonic"}}