Sha256: fcf6c7547338a2bcbbd3a09c899d3d4abcdd10ac68f99ecdb67f4920a5cb39a7

Contents?: true

Size: 556 Bytes

Versions: 4

Compression:

Stored size: 556 Bytes

Contents

class Monster
include Mongoid::Document
  # Enable Maestrano for this user
  maestrano_user_via :provider, :uid, :tenant do |user,maestrano|
    user.name = maestrano.first_name
    user.surname = maestrano.last_name
    user.email = maestrano.email
    
    # user.country_alpha2 = maestrano.country
    # user.some_required_field = 'some-appropriate-default-value'
  end

  ## User source identification fields
  field :provider,  type: String, default: ""
  field :uid,       type: String, default: ""
  field :tenant,    type: String, default: ""

end

Version data entries

4 entries across 4 versions & 1 rubygems

Version Path
maestrano-rails-1.0.0.pre.RC7 test/tmp/app/models/monster.rb
maestrano-rails-1.0.0.pre.RC6 test/tmp/app/models/monster.rb
maestrano-rails-0.15.2 test/tmp/app/models/monster.rb
maestrano-rails-0.15.1 test/tmp/app/models/monster.rb