2011/6/10 vhochstein <[email protected]>:
> just add virtual attributes to your model (set and get).
>
> in set you set the corresponding bit of your allowed_zone attribute
> and in get you read corresponding bit

Thanks a lot, I understand the concept of what you mean, but I don't
understand what does it mean "set". Do you mean defining the method?:

  class Client < ActiveRecord
    def allow_zone_1
      _READ BIT 1 OF COLUMN allowed_zones_
    end

    def allow_zone_1=(value)
      _WRITE_INTO BIT 1 OF COLUMN allowed_zones_
    end
  end


so I avoid calling "save" method within "allow_zone_1=" method, am I right?

Thanks a lot.

-- 
Iñaki Baz Castillo
<[email protected]>

-- 
You received this message because you are subscribed to the Google Groups 
"ActiveScaffold : Ruby on Rails plugin" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to 
[email protected].
For more options, visit this group at 
http://groups.google.com/group/activescaffold?hl=en.

Reply via email to