mirror of
https://github.com/rails/rails.git
synced 2022-11-09 12:12:34 -05:00
Mapper#resource and resources are both public methods
This commit is contained in:
parent
fbe7bcf1d6
commit
b37473ebbd
1 changed files with 4 additions and 4 deletions
|
@ -1704,20 +1704,20 @@ module ActionDispatch
|
|||
|
||||
def apply_common_behavior_for(method, resources, options, &block)
|
||||
if resources.length > 1
|
||||
resources.each { |r| send(method, r, options, &block) }
|
||||
resources.each { |r| public_send(method, r, options, &block) }
|
||||
return true
|
||||
end
|
||||
|
||||
if options[:shallow]
|
||||
options.delete(:shallow)
|
||||
shallow do
|
||||
send(method, resources.pop, options, &block)
|
||||
public_send(method, resources.pop, options, &block)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
||||
if resource_scope?
|
||||
nested { send(method, resources.pop, options, &block) }
|
||||
nested { public_send(method, resources.pop, options, &block) }
|
||||
return true
|
||||
end
|
||||
|
||||
|
@ -1728,7 +1728,7 @@ module ActionDispatch
|
|||
scope_options = options.slice!(*RESOURCE_OPTIONS)
|
||||
unless scope_options.empty?
|
||||
scope(scope_options) do
|
||||
send(method, resources.pop, options, &block)
|
||||
public_send(method, resources.pop, options, &block)
|
||||
end
|
||||
return true
|
||||
end
|
||||
|
|
Loading…
Reference in a new issue