obj.instance_variables might be the answer you are looking for,
although attr_accessor :name will not create the corresponding
instance variable.

Also, are you sure :first_name and :last_name should be class
attribute accessors and not instance ones (so plain attr_accessors)?

Balint

On Feb 5, 5:02 pm, bide <[email protected]> wrote:
> Hi,
>
> I´ve created an "acts_as" plugin where the user can add several
> attributes of his choice to the model.
> Now I´m looking for a way to allow the users to access all attributes
> without changing the plugin code
>
> e.g., now I set the accessors like this in the plugin code:
>    cattr_accessor :first_name, last_name
>
> I am looking for something like this:
>    attr_accessor :all
>
> Thanks for your help,
> bide
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Ruby 
on Rails: Talk" 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/rubyonrails-talk?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to