Merged rails-3.2 branch.
git-svn-id: svn+ssh://rubyforge.org/var/svn/redmine/trunk@9528 e93f8b46-1217-0410-a6f0-8f06a7374b81
This commit is contained in:
1 parent
34e20c4373
commit
5e57a1a9d9
457 files changed
+20215
-5352
No files matched your search
@@ -8,6 +8,9 @@ require 'active_record'
|
||||
module ActiveRecord
|
||||
class Base
|
||||
include Redmine::I18n
|
||||
def self.named_scope(*args)
|
||||
scope(*args)
|
||||
end
|
||||
|
||||
# Translate attribute names for validation errors display
|
||||
def self.human_attribute_name(attr, *args)
|
||||
@@ -35,6 +38,18 @@ module ActionView
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
class Resolver
|
||||
def find_all(name, prefix=nil, partial=false, details={}, key=nil, locals=[])
|
||||
cached(key, [name, prefix, partial], details, locals) do
|
||||
if details[:formats] & [:xml, :json]
|
||||
details = details.dup
|
||||
details[:formats] = details[:formats].dup + [:api]
|
||||
end
|
||||
find_templates(name, prefix, partial, details)
|
||||
end
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
ActionView::Base.field_error_proc = Proc.new{ |html_tag, instance| "#{html_tag}" }
|
||||
@@ -60,26 +75,9 @@ end
|
||||
|
||||
ActionMailer::Base.send :include, AsynchronousMailer
|
||||
|
||||
module TMail
|
||||
# TMail::Unquoter.convert_to_with_fallback_on_iso_8859_1 introduced in TMail 1.2.7
|
||||
# triggers a test failure in test_add_issue_with_japanese_keywords(MailHandlerTest)
|
||||
class Unquoter
|
||||
class << self
|
||||
alias_method :convert_to, :convert_to_without_fallback_on_iso_8859_1
|
||||
end
|
||||
end
|
||||
|
||||
# Patch for TMail 1.2.7. See http://www.redmine.org/issues/8751
|
||||
class Encoder
|
||||
def puts_meta(str)
|
||||
add_text str
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
module ActionController
|
||||
module MimeResponds
|
||||
class Responder
|
||||
class Collector
|
||||
def api(&block)
|
||||
any(:xml, :json, &block)
|
||||
end
|
||||
|
||||
@@ -1,5 +1,4 @@
|
||||
# Add new mime types for use in respond_to blocks:
|
||||
|
||||
Mime::SET << Mime::CSV unless Mime::SET.include?(Mime::CSV)
|
||||
Mime::Type.register 'application/pdf', :pdf
|
||||
Mime::Type.register 'image/png', :png
|
||||
|
||||
@@ -3,3 +3,5 @@ I18n.default_locale = 'en'
|
||||
I18n::Backend::Simple.send(:include, I18n::Backend::Fallbacks)
|
||||
|
||||
require 'redmine'
|
||||
|
||||
Redmine::Plugin.load
|
||||
Reference in new issue
Block a user