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

Load Balancing in Bluemix using custom domain and DNS SRV records -

oracle - pls-00402 alias required in select list of cursor to avoid duplicate column names -

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