{"pull_request":{"merged_at":null,"user":{"id":246978,"login":"JustinCampbell","url":"https://api.github.com/users/JustinCampbell","avatar_url":"https://secure.gravatar.com/avatar/cc39acd414ce976d5bc628f364a27005?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cc39acd414ce976d5bc628f364a27005"},"created_at":"2011-12-17T13:09:52Z","title":"Allow symbols to be passed as extension aliases in Mime::Type.register","updated_at":"2011-12-17T13:09:52Z","review_comments":0,"state":"open","id":606163,"patch_url":"https://github.com/rails/rails/pull/4012.patch","html_url":"https://github.com/rails/rails/pull/4012","closed_at":null,"deletions":1,"mergeable":null,"issue_url":"https://github.com/rails/rails/issues/4012","base":{"user":{"id":4223,"login":"rails","url":"https://api.github.com/users/rails","avatar_url":"https://secure.gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"30f39a09e233e8369dddf6feb4be0308"},"ref":"master","sha":"8de96949e9d3d8f0902486df343ad88401c028fd","repo":{"open_issues":597,"created_at":"2008-04-11T02:19:47Z","watchers":11579,"git_url":"git://github.com/rails/rails.git","updated_at":"2011-12-17T12:42:07Z","fork":false,"id":8514,"language":"Ruby","html_url":"https://github.com/rails/rails","name":"rails","description":"Ruby on Rails","master_branch":null,"forks":2511,"url":"https://api.github.com/repos/rails/rails","ssh_url":"git@github.com:rails/rails.git","clone_url":"https://github.com/rails/rails.git","pushed_at":"2011-12-17T11:58:33Z","owner":{"id":4223,"login":"rails","url":"https://api.github.com/users/rails","avatar_url":"https://secure.gravatar.com/avatar/30f39a09e233e8369dddf6feb4be0308?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-orgs.png","gravatar_id":"30f39a09e233e8369dddf6feb4be0308"},"homepage":"http://rubyonrails.org","size":51448,"svn_url":"https://svn.github.com/rails/rails","private":false},"label":"rails:master"},"body":"I was trying to do this:\r\n\r\n```rb\r\nMime::Type.register \"text/markdown\", :markdown, [], [:md, :mdown]\r\n```\r\nBut that didn't work. This did:\r\n\r\n```rb\r\nMime::Type.register \"text/markdown\", :markdown, [], [\"md\", \"mdown\"]\r\n```\r\nBut since the symbol parameter gets turned into the extension, it was confusing to pass strings as extension aliases.\r\n\r\nThis patch lets you use strings or symbols, and allows the same for `Mime::Type.register_alias`.\r\n\r\nI also added some tests.\r\n","commits":3,"number":4012,"additions":32,"url":"https://api.github.com/repos/rails/rails/pulls/4012","_links":{"review_comments":{"href":"https://api.github.com/repos/rails/rails/pulls/4012/comments"},"html":{"href":"https://github.com/rails/rails/pull/4012"},"self":{"href":"https://api.github.com/repos/rails/rails/pulls/4012"},"comments":{"href":"https://api.github.com/repos/rails/rails/issues/4012/comments"}},"merged_by":null,"diff_url":"https://github.com/rails/rails/pull/4012.diff","comments":0,"head":{"user":{"id":246978,"login":"JustinCampbell","url":"https://api.github.com/users/JustinCampbell","avatar_url":"https://secure.gravatar.com/avatar/cc39acd414ce976d5bc628f364a27005?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cc39acd414ce976d5bc628f364a27005"},"ref":"master","sha":"27f3619cd5d3700b2ff16f7c153c3549316b9410","repo":{"open_issues":0,"created_at":"2011-12-17T02:18:52Z","watchers":1,"git_url":"git://github.com/JustinCampbell/rails.git","updated_at":"2011-12-17T12:53:55Z","fork":true,"id":2999164,"language":"Ruby","html_url":"https://github.com/JustinCampbell/rails","name":"rails","description":"Ruby on Rails","master_branch":null,"forks":0,"url":"https://api.github.com/repos/JustinCampbell/rails","ssh_url":"git@github.com:JustinCampbell/rails.git","clone_url":"https://github.com/JustinCampbell/rails.git","pushed_at":"2011-12-17T12:53:54Z","owner":{"id":246978,"login":"JustinCampbell","url":"https://api.github.com/users/JustinCampbell","avatar_url":"https://secure.gravatar.com/avatar/cc39acd414ce976d5bc628f364a27005?d=https://a248.e.akamai.net/assets.github.com%2Fimages%2Fgravatars%2Fgravatar-140.png","gravatar_id":"cc39acd414ce976d5bc628f364a27005"},"homepage":"http://rubyonrails.org","size":1296,"svn_url":"https://svn.github.com/JustinCampbell/rails","private":false},"label":"JustinCampbell:master"},"changed_files":2,"merged":false},"number":4012,"action":"opened"}