addis_a
1
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
tomtt
2
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
tomtt
3
On Tuesday, November 25, 2014 9:02:29 PM UTC, der_tom wrote:
Model.attribute_aliases returns a hash with all the aliases.
Fred
tomtt
4
fred,
cant find it in the docs, is that also available for r3.2?
thx
On Wed, Nov 26, 2014 at 5:09 AM, Frederick C. <
tomtt
5
On Wednesday, November 26, 2014 4:53:23 PM UTC, der_tom wrote:
fred,
cant find it in the docs, is that also available for r3.2?
thx
I’ve no idea. Did you try it?
tomtt
6
4 - ok
3.2 - not ok
thx again
On Fri, Nov 28, 2014 at 5:52 AM, Frederick C. <