README.md in unidom-visitor-1.3 vs README.md in unidom-visitor-1.4

- old
+ new

@@ -51,49 +51,61 @@ # Sign in end ``` ### Authenticating model + ```ruby user = Unidom::Visitor::User.create! opened_at: Time.now password = Unidom::Visitor::Password.create! clear_text: 'password', opened_at: Time.now Unidom::Visitor::Authenticating.authenticate! user, with: password ``` ### Identificating model + ```ruby user = Unidom::Visitor::User.create! opened_at: Time.now email = Unidom::Contact::EmailAddress.full_address_is('name@company.com').valid_at.alive.first_or_create! opened_at: Time.now Unidom::Visitor::Identificating.identificate! user, as: email ``` ### Recognization model + ```ruby user = Unidom::Visitor::User.create! opened_at: Time.now person = Unidom::Party::Person.create! name: 'Tim', opened_at: Time.now Unidom::Visitor::Recognization.cognize! user, as: person ``` ## Inlcude the Concerns + ```ruby include Unidom::Visitor::Concerns::AsVisitor include Unidom::Visitor::Concerns::AsIdentity include Unidom::Visitor::Concerns::AsCredential ``` ### As Visitor concern + The As Visitor concern do the following tasks for the includer automatically: -1. Define the has_many :identificatings macro as: ``has_many :identificatings, class_name: 'Unidom::Visitor::Identificating', as: :visitor`` -2. Define the has_many :authenticatings macro as: ``has_many :authenticatings, class_name: 'Unidom::Visitor::Authenticating', as: :visitor`` -3. Define the has_many :recognizations macro as: ``has_many :recognizations, class_name: 'Unidom::Visitor::Recognization', as: :visitor`` -4. Define the .identified_by scope as: ``scope :identified_by, ->(identity) { joins(:identificatings).merge(Unidom::Visitor::Identificating.identity_is identity) }`` +1. Define the has_many :identificatings macro as: ``has_many :identificatings, class_name: 'Unidom::Visitor::Identificating', as: :visitor`` +2. Define the has_many :authenticatings macro as: ``has_many :authenticatings, class_name: 'Unidom::Visitor::Authenticating', as: :visitor`` +3. Define the has_many :recognizations macro as: ``has_many :recognizations, class_name: 'Unidom::Visitor::Recognization', as: :visitor`` +4. Define the .identified_by scope as: ``scope :identified_by, ->(identity) { joins(:identificatings).merge(Unidom::Visitor::Identificating.identity_is identity) }`` 5. Define the .sign_up method as: ``sign_up(identity, password: nil, opened_at: Time.now)`` ### As Identity concern + The As Identity concern do the following tasks for the includer automatically: 1. Define the has_many :identificatings macro as: ``has_many :identificatings, class_name: 'Unidom::Visitor::Identificating', as: :identity`` ### As Credential concern + The As Credential concern do the following tasks for the includer automatically: 1. Define the has_one :authenticatings macro as: ``has_one :authenticating, class_name: 'Unidom::Visitor::Authenticating', as: :credential`` + +### As Party concern + +The As Party concern do the following tasks for the includer automatically: +1. Define the has_many :recognizations macro as: ``has_many :recognizations, class_name: 'Unidom::Visitor::Recognization', as: :party``