Include aliases in attribute names #10518

wants to merge 1 commit into


None yet

2 participants

vanstee commented May 8, 2013

This came up when trying to include attribute aliases in the list of parameters wrapped by default: #10375. Returning both aliases and names in ActiveRecord#attribute_names seems like the best solution, as recommended by @jeremy.

jeremy commented May 8, 2013

Changing attribute_names directly means that scaffold/admin plugins that read a model's attribute names to show a table of records will now have duplicate columns.

Think this is a good case for introducing new API that returns a list of all attributes that the model responds to.

vanstee commented May 9, 2013

Ah yeah I didn't think of that. I guess since I'll be adding a new method and switching it out in the params wrapper I'll just add it to #10375

@vanstee vanstee closed this May 9, 2013
@vanstee vanstee deleted the vanstee:attribute-names-include-aliases branch May 9, 2013
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment