Class: Marty::ImportType

Inherits:
Base show all
Defined in:
app/models/marty/import_type.rb

Defined Under Namespace

Classes: ImportTypeValidator

Instance Method Summary collapse

Methods inherited from Base

get_final_attrs, get_struct_attrs, make_hash, make_openstruct, mcfly_pt

Methods inherited from ActiveRecord::Base

joins, old_joins

Instance Method Details

#allow_import?Boolean

Returns:

  • (Boolean)


38
39
40
# File 'app/models/marty/import_type.rb', line 38

def allow_import?
  Mcfly.whodunnit && Mcfly.whodunnit.roles.include?(role)
end

#get_model_classObject



34
35
36
# File 'app/models/marty/import_type.rb', line 34

def get_model_class
  db_model_name.constantize if db_model_name
end