Module: Sow

Defined in:
lib/seed_drill.rb,
lib/seed_drill/utils.rb,
lib/seed_drill/adapter.rb,
lib/seed_drill/active_record.rb

Defined Under Namespace

Classes: ActiveRecord, Adapter, Fields, Hasher, Sower

Class Method Summary collapse

Class Method Details

.ensure(relation_or_klass, fixed_fields = nil, &block) ⇒ Object

Sow.ensure(User) do |fixed|

fixed.email     '[email protected]'
zip_code        28205
state_province  :NC

end


14
15
16
# File 'lib/seed_drill.rb', line 14

def self.ensure(relation_or_klass, fixed_fields = nil, &block)
  Sower.new(relation_or_klass, &block).model
end