From 4fad953f90f82e860a69d67745887b40d5b15475 Mon Sep 17 00:00:00 2001 From: Yehuda Katz + Carl Lerche Date: Wed, 17 Jun 2009 12:00:23 -0700 Subject: Fixing pending tests and fixed some formats / partial rendering semantics --- actionpack/lib/action_dispatch/http/mime_type.rb | 14 +++++++++++++- 1 file changed, 13 insertions(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb') diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index 25156a4c75..dda6604bdd 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -2,7 +2,19 @@ require 'set' require 'active_support/core_ext/class/attribute_accessors' module Mime - SET = [] + class Mimes < Array + def symbols + @symbols ||= map {|m| m.to_sym } + end + + %w(<< concat shift unshift push pop []= clear compact! collect! + delete delete_at delete_if flatten! map! insert reject! reverse! + replace slice! sort! uniq!).each do |method| + define_method(method) { @symbols = nil; super } + end + end + + SET = Mimes.new EXTENSION_LOOKUP = {} LOOKUP = Hash.new { |h, k| h[k] = Type.new(k) unless k.blank? } -- cgit v1.2.3 From 4417a19b035d73eb46a5e06e296a4b1c8091bef1 Mon Sep 17 00:00:00 2001 From: Yehuda Katz Date: Tue, 23 Jun 2009 14:04:04 -0700 Subject: Small changes to get 1.9 passing (for the most part) --- actionpack/lib/action_dispatch/http/mime_type.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'actionpack/lib/action_dispatch/http/mime_type.rb') diff --git a/actionpack/lib/action_dispatch/http/mime_type.rb b/actionpack/lib/action_dispatch/http/mime_type.rb index dda6604bdd..27f27e27fe 100644 --- a/actionpack/lib/action_dispatch/http/mime_type.rb +++ b/actionpack/lib/action_dispatch/http/mime_type.rb @@ -10,7 +10,7 @@ module Mime %w(<< concat shift unshift push pop []= clear compact! collect! delete delete_at delete_if flatten! map! insert reject! reverse! replace slice! sort! uniq!).each do |method| - define_method(method) { @symbols = nil; super } + define_method(method) {|*args| @symbols = nil; super(*args) } end end -- cgit v1.2.3