Method: Trust::Controller::Resource#parent_name

Defined in:
lib/trust/controller/resource.rb

#parent_nameObject

Returns the name of the parent resource

Example

# in AccountsController where belongs_to :customer has been declared
resource.parent_name  # => :customer


244
245
246
# File 'lib/trust/controller/resource.rb', line 244

def parent_name
  parent_info && parent_info.name
end