I have a model named User, with the following fields: FirstName, LastName
In the model I'm using the alias_attribute method to access these fields using underscore naming convetions
alias_attribute :first_name, :FirstName
alias_attribute :last_name, :LastName
This allows me to the following:
and I get something like "Bob" back.
Now, when I do something like User.last, I still get the original column names
... FirstName: "Bob", LastName: "Smith"...
I'd like to receive the alias attributes back instead, something like this
... first_name: "Bob", last_name: "Smith"...