Class: HiringThing::Resource
- Inherits:
-
ActiveResource::Base
- Object
- ActiveResource::Base
- HiringThing::Resource
show all
- Defined in:
- lib/hiringthing_api/resources/resource.rb
Class Method Summary
collapse
Class Method Details
.element_name ⇒ Object
5
6
7
|
# File 'lib/hiringthing_api/resources/resource.rb', line 5
def self.element_name
name.split(/::/).last.underscore
end
|
.method_missing(method, *args, &block) ⇒ Object
9
10
11
12
13
14
15
|
# File 'lib/hiringthing_api/resources/resource.rb', line 9
def self.method_missing(method, *args, &block)
if(["active", "hidden", "archived", "rated","unrated"].include?(method.to_s))
self.find(:all, :from => method.to_sym)
else
super
end
end
|