Having two different sort of validate, from user or app itself in rails -


my program trying create groups automatically, prefix of 'automated_group', won't show when loading groups, can't edited, , more stuff. have limit users doing it. if make validate function, won't let app , group.save returns false. when updating other attributes, won't let me save it, cause name won't validate.

is there other way? use validation, or maybe check who's changing value?

thanks in advance

you can use permission system cancan (https://github.com/ryanb/cancan). can define someting this:

can :manage, group, automated_group: false 

Comments

Popular posts from this blog

libGdx unable to find files in android application data directory -

php - Webix Data Loading from Laravel Link -

python - Consider setting $PYTHONHOME to <prefix>[:<exec_prefix>] error -