Skip to content

brianjfox/generic-people-rails

Repository files navigation

GenericPeopleRails

This project rocks and uses MIT-LICENSE.

GenericPeopleRails (GPR) provides models for the following:

* address: a possibly geocoded physical and/or postal address.
* carrier: a phone or data service provider.
* contact: contact information for a person.
* credential: authentication and/or authorization info for a member.
* device: a digital device belonging to a person.
* email: a person's email address.
* label: a descriptor for something, suitable for display or use in referencing.
* last_login: the last time a member 'logged in' to something.
* member: the part of a person able to participate in relationships with other things.
* nickname: nickname for a person.
* permission: denotes a capability for a credential and associated member.
* permission_label: descriptor for a permission.
* person: a human.
* phone: a person's communication device.

These models can be subclasses as necessary to provide application-specific features.

INSTALL

add the following to your Gemfile:

gem 'generic_people_rails', git: '[email protected]:generic_people_rails.git'

Mount the engine/install the gem:

rails g generic_people_rails:install

And finally, migrate your database:

rake db:migrate

This will install all the tables that GenericPeopleRails needs.

You’ll also want to add this to your_app/config/initializers/models_load.rb:

# Ensure that every model of interest is loaded. Rails.application.eager_load! Rails::Engine.descendants.each { |d| d.eager_load! rescue nil }

TODO: make a rake task (or add to the gpr install task) creation of models_load.rb, but pay attention to making it load things in the proper order. Maybe in the same order that engines are mounted? Which I guess would only be possible for engines mounted prior to gpr getting installed.

About

OLI's Generic People Rails GEM

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published