How to access constant array of a model inside a view

Hello All,

  I have this array (of, say User's contact preferences) inside the 

User
model.

CONTACT_PREFERENCES = [“Email”, “Mobile Phone”, “Residence Phone”,
“Office
Phone”, “Fax”]

and inside the view (when registering a new user) I have to show them
inside
a combo (or a list of check boxes), but when I do something like this

User::CONTACT_PREFERENCES.each { }

it gives me

Symbol as array index

any ideas how I should achieve a similar effect, Thanks in advance.


Ishaq
http://blogs.kahaf.com/ishaq

  • Programming can be fun, so can be cryptography, however they should
    not be
    combined …

hmm, does that mean there is no way to do it?

On Feb 12, 2008 2:59 PM, Muhammad I. [email protected] wrote:

Ishaq
http://blogs.kahaf.com/ishaq

  • Programming can be fun, so can be cryptography, however they should not
    be combined …


Ishaq
http://blogs.kahaf.com/ishaq

  • Programming can be fun, so can be cryptography, however they should
    not be
    combined …