3 ms·
Yes it is. But even ignoring that, Rails 3.2 added a feature to do something similar: roles. You can do things like this in the model: attr_accessible :use
by petercooper 15y ago
Yes it is. But even ignoring that, Rails 3.2 added a feature to do something similar: roles. You can do things like this in the model:
attr_accessible :user_id, :on => :admin
And in controllers (or anywhere, really):
@something.update_attributes(params[:something], :as => :admin)
It's naive and it's not exactly an ACL or anything but it's a way to indicate the context at a basic level.
Sadly, people seem to be running around like headless chickens trying to scotch tape trash bags over a broken window instead of learning how to replace the glass.