Active Controller field custom behaviour


(Modaei) #1

In one of my ActiveRecord models I have a field called status_id.

this field should be sent to the client via GET but when the user creates a new model using POST, It should be set to 1, not the value which is sent from the client.

also the client should not be able to update it.

How can I do that?