CyberCraftInc / vacation_system

Cyber Craft Vacation System
0 stars 0 forks source link

Add RoR CRUD for User model #131

Closed eleidan closed 8 years ago

eleidan commented 8 years ago

Update User policy The following changes are introduced:

NOTE: The policy is a subject for changes in future! Probably the best option is to move to current user related access. For instance, to use URI like /users/approval_requests instead of /users/<user_id>/approval_requests Another way is to use Pundit scopes to provide smart filtering.

Override User#as_json to filter out attributes The main idea is to provide only particular set of attributes by default. For instance, BB does not care about created_at and updated_at attributes.

Provide possibility to skip password validation The main idea is to allow creating new users without passwords. The Devise takes care of many manipulations on User model, and it provides possibility to save User model into DB omitting password validation.

Update the following CRUD action methods in UsersController:

Add the following CRUD action methods into UsersController:

alazarchuk commented 8 years ago

LGTM