Class: Marty::ImportType

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

Defined Under Namespace

Classes: ImportTypeValidator

Constant Summary

Constants inherited from ActiveRecord::Base

ActiveRecord::Base::COUNT_SIG, ActiveRecord::Base::DISTINCT_SIG, ActiveRecord::Base::FIND_BY_SIG, ActiveRecord::Base::FIRST_SIG, ActiveRecord::Base::GROUP_SIG, ActiveRecord::Base::JOINS_SIG, ActiveRecord::Base::LAST_SIG, ActiveRecord::Base::LIMIT_SIG, ActiveRecord::Base::MCFLY_PT_SIG, ActiveRecord::Base::NOT_SIG, ActiveRecord::Base::ORDER_SIG, ActiveRecord::Base::PLUCK_SIG, ActiveRecord::Base::SELECT_SIG, ActiveRecord::Base::WHERE_SIG

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)


40
41
42
# File 'app/models/marty/import_type.rb', line 40

def allow_import?
  Mcfly.whodunnit && Mcfly.whodunnit.roles.pluck(:id).include?(role_id)
end

#get_model_classObject



36
37
38
# File 'app/models/marty/import_type.rb', line 36

def get_model_class
  db_model_name.constantize if db_model_name
end