Conditional attr_protected

Hi all, first off, let me say I am new to the Rails framework. With that
being said, please let me know if there is a better way of doing this.

I have a user object that contains some flags, is_active being one of
them. When I sign up a user, I don’t want someone to be able to set that
field by hacking the form, so I was going to use attr_protected.
However, in the admin application, I would like that is_active field to
be able to be set. Is there a way to do this without having to check for
that field before I save?

Let me know if there are any clarifications needed.

Thanks in advance.

  • J

This forum is not affiliated to the Ruby language, Ruby on Rails framework, nor any Ruby applications discussed here.

| Privacy Policy | Terms of Service | Remote Ruby Jobs