Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Added logging statement

  • Loading branch information...
commit deb9659eb749a2182bf2b486029d9b5bf591007c 1 parent 4e902ad
@hunterae authored
Showing with 2 additions and 0 deletions.
  1. +2 −0  lib/cancan/controller_resource.rb
View
2  lib/cancan/controller_resource.rb
@@ -130,8 +130,10 @@ def collection_instance
# If the :shallow option is passed it will use the resource_class if there's no parent
# If the :singleton option is passed it won't use the association because it needs to be handled later.
def resource_base
+ puts "The name in parent is #{@options[:name_in_parent]}"
if @options[:through]
if parent_resource
+ puts "This is a parent resource"
@options[:singleton] ? parent_resource : parent_resource.send(@options[:name_in_parent] || name.to_s.pluralize)
elsif @options[:shallow]
resource_class
Please sign in to comment.
Something went wrong with that request. Please try again.