#1
  1. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    174
    Rep Power
    12

    Getting column names from a record set


    Hello,

    I'm trying to get the column names associated w/ this record set:


    account_all = Account.find(:all)


    Since account_all is an array - how do I get the names?


    I know there's got to be a simple way to do this.
  2. #2
  3. No Profile Picture
    Contributing User
    Devshed Newbie (0 - 499 posts)

    Join Date
    Mar 2003
    Posts
    174
    Rep Power
    12
    Sweet - here's what I was looking for:

    account_all.first.attributes.keys

IMN logo majestic logo threadwatch logo seochat tools logo