Rails

Tips

Rename a Column with alias_attribute

Use alias_attribute in your model to create an alias for an existing database column without modifying the schema.

class User < ApplicationRecord
  alias_attribute :new_name, :old_name
end