Remove monkey patch which has been merged upstream in rails 4
This commit is contained in:
parent
309831a619
commit
e73a770d81
1 changed files with 0 additions and 32 deletions
|
@ -1,32 +0,0 @@
|
|||
#
|
||||
# Make :formats work when rendering one partial from another
|
||||
#
|
||||
# Taken from https://github.com/rails/rails/pull/6626
|
||||
#
|
||||
module ActionView
|
||||
class AbstractRenderer #:nodoc:
|
||||
def prepend_formats(formats)
|
||||
formats = Array(formats)
|
||||
return if formats.empty?
|
||||
@lookup_context.formats = formats | @lookup_context.formats
|
||||
end
|
||||
end
|
||||
|
||||
class PartialRenderer
|
||||
def setup_with_formats(context, options, block)
|
||||
prepend_formats(options[:formats])
|
||||
setup_without_formats(context, options, block)
|
||||
end
|
||||
|
||||
alias_method_chain :setup, :formats
|
||||
end
|
||||
|
||||
class TemplateRenderer
|
||||
def render_with_formats(context, options)
|
||||
prepend_formats(options[:formats])
|
||||
render_without_formats(context, options)
|
||||
end
|
||||
|
||||
alias_method_chain :render, :formats
|
||||
end
|
||||
end
|
Loading…
Add table
Add a link
Reference in a new issue