# File lib/smooth_operator/persistence.rb, line 143 def primary_key get_option :primary_key, 'id' end
module ClassMethods
Constants
- METHODS_VS_HTTP_VERBS
Public Instance Methods
create(attributes = nil, relative_path = nil, data = {}, options = {})
click to toggle source
# File lib/smooth_operator/persistence.rb, line 151 def create(attributes = nil, relative_path = nil, data = {}, options = {}) new(attributes).tap do |object| object.save(relative_path, data, options) end end
destroy_key()
click to toggle source
# File lib/smooth_operator/persistence.rb, line 147 def destroy_key get_option :destroy_key, '_destroy' end
http_verb_for(method)
click to toggle source
# File lib/smooth_operator/persistence.rb, line 139 def http_verb_for(method) get_option "#{method}_http_verb".to_sym, METHODS_VS_HTTP_VERBS[method] end
primary_key()
click to toggle source