Skip to content

Structures and methods for the real world.

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
MIT-LICENSE
Notifications You must be signed in to change notification settings

opuslogica/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.

UPGRADE

Changes were made from the original gpr. You’ll need to upgrade in conjunction with the weblogin gem.

Create a new your_app/config/initializers/generic_people_rails.rb

(see the generators templates for details)

Migrate your database (adds salt to the passwords and paranoia on the member model)

rake db:migrate

For the mailers to work, be sure you have some default options set up in your environment files:

config.action_mailer.default_url_options = { :host => 'http://www.twicketer.com' }
config.action_mailer.default_options = {from: '[email protected]'}

Add the style class to your application.css

*= require 'generic_people_rails'

About

Structures and methods for the real world.

Resources

License

GPL-3.0, MIT licenses found

Licenses found

GPL-3.0
LICENSE
MIT
MIT-LICENSE

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 3

  •  
  •  
  •  

Languages