How to lock a row and all its associated rows

Hi,

I have a profile table, module table and book table. A profile has many
modules, a module has many books. Module belongs to profile and book
belongs to module.

When a user accesses a profile, the profile and the associated modules
and books will be locked. Meaning that other users cannot edit or delete
this profile and the associated modules and books.

How can I achieve that? Someone please help.

Thanks

On 1 Jul 2008, at 09:36, user splash wrote:

delete
this profile and the associated modules and books.

How can I achieve that? Someone please help.

Set a flag on the profile to indicate it is being edited (or perhaps
the user id of the editor so that you can say ‘locked by bob’) and
disallow edits based on that.

Fred

Peripheral observation: I’m going to be surprised if you don’t have a
problem with the ‘module table’ at some point since ‘module’ is a
reserved word in Ruby.

On Jul 1, 5:56 am, Frederick C. [email protected]

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