Module: SmoothOperator::Persistence::ClassMethods
- Defined in:
- lib/smooth_operator/persistence.rb
Instance Method Summary collapse
- #create(attributes = nil, relative_path = nil, data = {}, options = {}) ⇒ Object
- #methods_vs_http_verbs ⇒ Object
Instance Method Details
#create(attributes = nil, relative_path = nil, data = {}, options = {}) ⇒ Object
19 20 21 |
# File 'lib/smooth_operator/persistence.rb', line 19 def create(attributes = nil, relative_path = nil, data = {}, = {}) new(attributes).tap { |object| object.save(relative_path, data, ) } end |
#methods_vs_http_verbs ⇒ Object
11 12 13 |
# File 'lib/smooth_operator/persistence.rb', line 11 def methods_vs_http_verbs @methods_vs_http_verbs ||= { reload: :get, create: :post, update: :put, destroy: :delete } end |