Reputation: 69
hi guys i don't know how to do it? my web users date's expired then that users can't anything on my web. i'm using RoR 4. my web consist user and product model. product model consist CRUD. and user model date is more than Now time. it's expired then that user do nothing that model. how to solve this. sorry my english skill
Upvotes: 0
Views: 75
Reputation: 1071
You can set a before_filter in ApplicationController (or ProductController) so if the date is expired it redirects user to an error/config/... page
If you expect your app to grow, you may consider using something like CanCan to manage permissions, so you can control more cases in the future
Upvotes: 1