Module: Smartfm::PublicContent::InstanceMethods

Defined in:
lib/smartfm/modules/public_content.rb

Instance Method Summary collapse

Instance Method Details

#delete(auth) ⇒ Object Also known as: destroy



48
49
50
# File 'lib/smartfm/modules/public_content.rb', line 48

def delete(auth)
  self.rest_client.delete(auth, {:id => self.id})
end

#save(auth) ⇒ Object



36
37
38
39
40
41
42
43
44
45
46
# File 'lib/smartfm/modules/public_content.rb', line 36

def save(auth)
  result = self.rest_client.create(auth, self.to_post_data)
  case result
  when Hash
    self.deserialize(result)
  when String
    self.class.find(result)
  else
    true
  end
end