Module: Ubiquitously::Restful::Post::ClassMethods

Defined in:
lib/ubiquitously/models/service/post/restful.rb

Instance Method Summary collapse

Instance Method Details

#create(attributes = {}) ⇒ Object



15
16
17
18
19
# File 'lib/ubiquitously/models/service/post/restful.rb', line 15

def create(attributes = {})
  record = new(attributes)
  record.save
  record
end

#create!(attributes = {}) ⇒ Object



21
22
23
24
25
# File 'lib/ubiquitously/models/service/post/restful.rb', line 21

def create!(attributes = {})
  record = new(attributes)
  record.save!
  record
end

#find(options = {}) ⇒ Object



27
28
29
# File 'lib/ubiquitously/models/service/post/restful.rb', line 27

def find(options = {})
  nil
end

#restfulObject



11
12
13
# File 'lib/ubiquitously/models/service/post/restful.rb', line 11

def restful
  subclassable_callbacks :create, :update, :destroy
end