need list of all aliases

hi,

im having this:

alias_attribute “id” , “No_”

alias_attribute “name” , “Name”

alias_attribute “name2” , “Name 2”

alias_attribute “address” , “Address”

alias_attribute “no_series” , “No Series”

alias_attribute “property_no” , "Property N

in my active record model.

now i need a list of all the columnames which have been aliased.

any ideas?

thx

I assume you are using a linux system or something like that. I would just use grep. Something like 'find . -name \*rb|xargs grep alias_attribute'.

Of course I am an old Unix guy and there might be some other way of getting it.

Norm

Model.attribute_aliases returns a hash with all the aliases.

Fred

fred,
cant find it in the docs, is that also available for r3.2?

thx

fred,
cant find it in the docs, is that also available for r3.2?

thx

I’ve no idea. Did you try it?

4 - ok
3.2 - not ok

thx again