Sha256: b9c28d20c43ce6d3f755b36cf7ae3dc35f640a4d9f8745b3133faff7000d8ea7

Contents?: true

Size: 223 Bytes

Versions: 3

Compression:

Stored size: 223 Bytes

Contents

FactoryGirl.define do
  factory :user do
    [:admin, :editor, :author, :user].each do |role_key|
      trait "role_#{role_key}".to_sym do
        role User::Role.const_get(role_key.to_s.upcase)
      end
    end
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
rails_attr_enum-0.2.0 test/dummy/spec/factories/users.rb
rails_attr_enum-0.1.1 test/dummy/spec/factories/users.rb
rails_attr_enum-0.1.0 test/dummy/spec/factories/users.rb