Install role_model and cancancan

For security features.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update User model with security methods

Also compiled new attributes in one migration file.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update UserController

Based on pesto implementation

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Install Simple Form gem

Convenient way of creating input forms.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Moved ability model to the test app

The ability model should be in the main app in order
to specify the security rules.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
For root path methods in the engine, call them from main_app

Because the engine does not have a root path.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Installed simple form generator

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
BUGFIX: use snake case in router name

Or else Devise won't be able to find the module

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Added simple form to the engine
Move full_name from private

This helper method should be public

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Removed empty helper classes

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Move user factory to spec/support folder

RSpec is already configured to include all classes inside
the spec/support folder so factories should be inside it.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Move User Spec to the correct folder

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update rails helper to include necessary classes

- the helper stub class has methods that can be used for
tests.
- include url_helpers in controller tests to be able to
use _path methods in the controller tests.
- include devise test helpers in view tests in order to
use signin/signout and other devise methods in the view
tests.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update view specs

Use the correct route and User class.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Complete user views

Update the previously empty form and list table
for the user maintenance module.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update the routes

Profile routes allow users to edit their own user accounts
and admin routes allow for admin to edit other users.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update user controller spec

Update the flow for controller actions in the tests
and check the output

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update the test app home view with a link to sign out

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>
Update routing spec

Included additional routes for profile and password
reset. Update routing tests and used url helpers.

Signed-off-by: Joan Tiffany Siy <joan@teamcodeflux.com>