|
|
|
|
|
by callumjones
5215 days ago
|
|
I'm somewhat of two minds about this one. 1) The model could be used everywhere so it may be best to negate the issue by locking down the attributes at one source. 2) As you pointed out, the model is in different contexts depending on the privilege of the current user session. It's almost as if I want a thin layer between my model and controller that takes into account session info and informs the model about what can and can't be done. |
|
What I don't know is if RoR allows for this sort of modeling. I have no experience with the framework. It might want something that is similar to getters/setters in Java. If this is the case, such a modeling is problem not going to work since the multiple params will break the spec.