{"action":"closed","issue":{"url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1245","labels_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1245/labels{/name}","comments_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1245/comments","events_url":"https://api.github.com/repos/rails-api/active_model_serializers/issues/1245/events","html_url":"https://github.com/rails-api/active_model_serializers/issues/1245","id":110050201,"number":1245,"title":"Can not filter attributes dymically?","user":{"login":"groe","id":515293,"avatar_url":"https://avatars.githubusercontent.com/u/515293?v=3","gravatar_id":"","url":"https://api.github.com/users/groe","html_url":"https://github.com/groe","followers_url":"https://api.github.com/users/groe/followers","following_url":"https://api.github.com/users/groe/following{/other_user}","gists_url":"https://api.github.com/users/groe/gists{/gist_id}","starred_url":"https://api.github.com/users/groe/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/groe/subscriptions","organizations_url":"https://api.github.com/users/groe/orgs","repos_url":"https://api.github.com/users/groe/repos","events_url":"https://api.github.com/users/groe/events{/privacy}","received_events_url":"https://api.github.com/users/groe/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Feature","name":"Feature","color":"009800"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/Needs%20Team%20Discussion","name":"Needs Team Discussion","color":"5319e7"},{"url":"https://api.github.com/repos/rails-api/active_model_serializers/labels/V:%200.10.x","name":"V: 0.10.x","color":"bfd4f2"}],"state":"closed","locked":false,"assignee":null,"milestone":null,"comments":16,"created_at":"2015-10-06T16:41:02Z","updated_at":"2016-01-20T00:39:57Z","closed_at":"2016-01-20T00:39:57Z","body":"In version 0.8.x it was possible to dynamically exclude certain attributes by implementing `include_<name>?` and returning false. In 0.9.x the same could be achieved with the `filter(keys)` method. For 0.10.0.rc3 [this SO answer](http://stackoverflow.com/a/32490558) suggests overwriting the `attributes` method but that requires the attribute to exist anyway (and it is fetched always, even when excluded, which is not ideal from a performance point of view).\r\n\r\nWhat is the recommended way to filter attributes (e.g. based on the current user, or options passed from the view) in 0.10.0.rc3 using the standard attributes adapter?"}}