Sha256: 421a0cec93791ab372c3ca3fef0257e675a8cde0c004af449f3390ca46b47ebb
Contents?: true
Size: 612 Bytes
Versions: 1
Compression:
Stored size: 612 Bytes
Contents
require 'machinist/active_record' require 'faker' # START blueprints Account.blueprint do name { Faker::Name.first_name } surname { Faker::Name.last_name } email { Faker::Internet.email } password { "password" } password_confirmation { "password" } role { "admin" } end # END blueprints # A factory which we can use to build objects which are a bit more complex or # which require special setup which can't be done by Machinist without a bit of # help. # module Factory class << self def make_admin account = Account.make(:admin) account.save! account end end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
lazy-head-gen-0.1.0 | lib/lazy-head-gen/templates/blueprints.rb.tt |