Module: ResourcefulController::ResourceIdentification::ClassMethods

Defined in:
lib/resourceful_controller/resource_identification.rb

Instance Method Summary collapse

Instance Method Details

#resource_classObject



17
18
19
# File 'lib/resourceful_controller/resource_identification.rb', line 17

def resource_class
  resource_name.classify.constantize
end

#resource_nameObject



9
10
11
# File 'lib/resourceful_controller/resource_identification.rb', line 9

def resource_name
  resources_name.singularize
end

#resources_nameObject



13
14
15
# File 'lib/resourceful_controller/resource_identification.rb', line 13

def resources_name
  controller_name
end