Class: Airtable::ORM::Base

Inherits:
Object
  • Object
show all
Extended by:
ActiveModel::Callbacks
Includes:
ActiveModel::Model, Associations, Attributes, Core, Persistence, Querying
Defined in:
lib/airtable/orm/base.rb

Constant Summary

Constants included from Querying

Querying::DEFAULT_MAX_RECORDS, Querying::DEFAULT_PAGE_SIZE

Constants included from Persistence

Persistence::BATCH_SIZE, Persistence::MAX_FIND_MANY_IDS

Constants included from Attributes

Attributes::READ_ONLY_ATTRIBUTES

Class Method Summary collapse

Instance Method Summary collapse

Methods included from Persistence

#apply_response_fields, #assign_persistence_state, #client, #create_record, #destroy, #destroyed?, #handle_persistence_response, #initialize, #new_record?, #persisted?, #previously_new_record?, #reload, #save, #save!, #update, #update!, #update_record

Methods included from Attributes

#[], #[]=, #attribute_defined?, #fields_for_create, #fields_for_update, #map_attributes, #read_raw_attribute, #read_special_attribute, #special_attribute?, #symbol_attributes, #validate_not_readonly!, #validate_regular_attribute!, #validate_symbol_key!, #write_raw_attribute

Methods included from Core

#==, #freeze, #hash, #inspect, #to_h

Class Method Details

.base_idObject

Get the base ID from config



22
23
24
# File 'lib/airtable/orm/base.rb', line 22

def base_id
  ORM.config.base_id
end

Instance Method Details

#urlObject

Public deeplink to this record in the Airtable UI.



28
29
30
# File 'lib/airtable/orm/base.rb', line 28

def url
  "https://airtable.com/#{self.class.base_id}/#{self.class.table_id}/#{id}"
end