lib/eventbrite/api_object.rb
# Save function. Individual objects can alter functionality by changing callbacks
Save function. Individual objects can alter functionality by changing callbacks
Save function . Individual objects can alter functionality by changing callbacks
def save(opts = {})
      return false unless dirty?
      opts.merge!(updatable_hash(self.class.requires))
      opts = relations_save(opts)
      opts = before_save(opts)
      call = if loaded?
        c = Eventbrite.call("#{self.class.singlet_name}_update", prep_api_hash('update', opts))
        after_update
        c
      else
        c = Eventbrite.call("#{self.class.singlet_name}_new", prep_api_hash('new', opts))
        after_new
        c
      end
      self.id = call["process"]["id"] unless loaded?
      collections_save
      after_save
      clean!
      call
    end
def save ( opts = { } ) return false unless dirty? opts . merge! ( updatable_hash ( self . class . requires ) ) opts = relations_save ( opts ) opts = before_save ( opts ) call = if loaded? c = Eventbrite . call ( "#{self.class.singlet_name}_update" , prep_api_hash ( 'update' , opts ) ) after_update c else c = Eventbrite . call ( "#{self.class.singlet_name}_new" , prep_api_hash ( 'new' , opts ) ) after_new c end self . id = call [ "process" ] [ "id" ] unless loaded? collections_save after_save clean! call end
Save function.
Save function .
opts
<not_specific>