{"action":"created","issue":{"url":"https://api.github.com/repos/rails/rails/issues/19377","labels_url":"https://api.github.com/repos/rails/rails/issues/19377/labels{/name}","comments_url":"https://api.github.com/repos/rails/rails/issues/19377/comments","events_url":"https://api.github.com/repos/rails/rails/issues/19377/events","html_url":"https://github.com/rails/rails/pull/19377","id":62416392,"number":19377,"title":"when a template is missing for the default render, do head no_content instead","user":{"login":"sb8244","id":1231659,"avatar_url":"https://avatars.githubusercontent.com/u/1231659?v=3","gravatar_id":"","url":"https://api.github.com/users/sb8244","html_url":"https://github.com/sb8244","followers_url":"https://api.github.com/users/sb8244/followers","following_url":"https://api.github.com/users/sb8244/following{/other_user}","gists_url":"https://api.github.com/users/sb8244/gists{/gist_id}","starred_url":"https://api.github.com/users/sb8244/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb8244/subscriptions","organizations_url":"https://api.github.com/users/sb8244/orgs","repos_url":"https://api.github.com/users/sb8244/repos","events_url":"https://api.github.com/users/sb8244/events{/privacy}","received_events_url":"https://api.github.com/users/sb8244/received_events","type":"User","site_admin":false},"labels":[{"url":"https://api.github.com/repos/rails/rails/labels/actionview","name":"actionview","color":"d7e102"}],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":2,"created_at":"2015-03-17T14:42:51Z","updated_at":"2015-03-17T15:06:08Z","closed_at":null,"pull_request":{"url":"https://api.github.com/repos/rails/rails/pulls/19377","html_url":"https://github.com/rails/rails/pull/19377","diff_url":"https://github.com/rails/rails/pull/19377.diff","patch_url":"https://github.com/rails/rails/pull/19377.patch"},"body":"https://github.com/rails/rails/issues/19036#issuecomment-82362962\r\n\r\nI want to do a comparison like:\r\n\r\n```ruby\r\n    def default_render(*args)\r\n      if template_exists?(action, _prefixes)\r\n        render(*args)\r\n      else\r\n        head :no_content\r\n      end\r\n    end\r\n```\r\n\r\nHowever, there is no way (that I know of) to access the action at this point, it is simply the method. I opted for rescuing `MissingTemplate` as an iteration 1 that I will look into refactoring. Ideally, the logic for rendering `default_render` vs `head :no_content` will happen in `ImplicitRender#send_action` and not in default_render."},"comment":{"url":"https://api.github.com/repos/rails/rails/issues/comments/82396854","html_url":"https://github.com/rails/rails/pull/19377#issuecomment-82396854","issue_url":"https://api.github.com/repos/rails/rails/issues/19377","id":82396854,"user":{"login":"sb8244","id":1231659,"avatar_url":"https://avatars.githubusercontent.com/u/1231659?v=3","gravatar_id":"","url":"https://api.github.com/users/sb8244","html_url":"https://github.com/sb8244","followers_url":"https://api.github.com/users/sb8244/followers","following_url":"https://api.github.com/users/sb8244/following{/other_user}","gists_url":"https://api.github.com/users/sb8244/gists{/gist_id}","starred_url":"https://api.github.com/users/sb8244/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/sb8244/subscriptions","organizations_url":"https://api.github.com/users/sb8244/orgs","repos_url":"https://api.github.com/users/sb8244/repos","events_url":"https://api.github.com/users/sb8244/events{/privacy}","received_events_url":"https://api.github.com/users/sb8244/received_events","type":"User","site_admin":false},"created_at":"2015-03-17T15:06:08Z","updated_at":"2015-03-17T15:06:08Z","body":"@rafaelfranca in send_action, how do you get access to the action_name from the method? I need this to do template_exists as the method/action_name may differ."}}