Method: ConfigScripts::Seeds::SeedType#has_scope

Defined in:
lib/config_scripts/seeds/seed_type.rb

#has_scope(method, *args) ⇒ Array

This method adds a scope to the list used to filter the records for writing.

Parameters:

  • method (Symbol)

    The name of the method to call on the relation.

  • args (Array)

    The arguments that will be passed into the scope method on the relation.

Returns:

  • (Array)

    The full list of scopes.



130
131
132
# File 'lib/config_scripts/seeds/seed_type.rb', line 130

def has_scope(method, *args)
  @scopes << [method, args]
end