Class: Point::ZoneRecord

Inherits:
Base
  • Object
show all
Defined in:
lib/point/zone_record.rb

Instance Attribute Summary

Attributes inherited from Base

#attributes, #errors, #id

Class Method Summary collapse

Instance Method Summary collapse

Methods inherited from Base

#create, #destroy, find, find_all, find_single, #method_missing, #new_record?, #post, post, #save, #update

Dynamic Method Handling

This class handles dynamic methods through the method_missing method in the class Point::Base

Class Method Details

.class_nameObject



13
14
15
# File 'lib/point/zone_record.rb', line 13

def class_name
  "zone_record"
end

.collection_path(params = {}) ⇒ Object



5
6
7
# File 'lib/point/zone_record.rb', line 5

def collection_path(params = {})
  "zones/#{params[:zone].id}/records"
end

.member_path(id, params = {}) ⇒ Object



9
10
11
# File 'lib/point/zone_record.rb', line 9

def member_path(id, params = {})
  "zones/#{params[:zone].id}/records/#{id}"
end

Instance Method Details

#default_paramsObject



18
19
20
# File 'lib/point/zone_record.rb', line 18

def default_params
  {:zone => self.zone}
end