Class: BulkImports::Export
Constant Summary
collapse
- STARTED =
0
- FINISHED =
1
- FAILED =
-1
ApplicationRecord::MAX_PLUCK
Instance Method Summary
collapse
#clear_memoization, #strong_memoize, #strong_memoized?
cached_column_list, #create_or_load_association, declarative_enum, default_select_columns, id_in, id_not_in, iid_in, pluck_primary_key, primary_key_in, #readable_by?, safe_ensure_unique, safe_find_or_create_by, safe_find_or_create_by!, #to_ability_name, underscore, where_exists, where_not_exists, with_fast_read_statement_timeout, without_order
#serializable_hash
Instance Method Details
#config ⇒ Object
59
60
61
62
63
|
# File 'app/models/bulk_imports/export.rb', line 59
def config
strong_memoize(:config) do
FileTransfer.config_for(portable)
end
end
|
#portable ⇒ Object
49
50
51
52
53
|
# File 'app/models/bulk_imports/export.rb', line 49
def portable
strong_memoize(:portable) do
project || group
end
end
|
#portable_relation? ⇒ Boolean
43
44
45
46
47
|
# File 'app/models/bulk_imports/export.rb', line 43
def portable_relation?
return unless portable
errors.add(:relation, 'Unsupported portable relation') unless config.portable_relations.include?(relation)
end
|
#relation_definition ⇒ Object
55
56
57
|
# File 'app/models/bulk_imports/export.rb', line 55
def relation_definition
config.relation_definition_for(relation)
end
|