instance method
alias_attribute
Ruby on Rails 3.2.22.5
Since v3.0.20Signature
alias_attribute(new_name, old_name)
No documentation comment.
Parameters
-
new_namereq -
old_namereq
Source
# File activemodel/lib/active_model/attribute_methods.rb, line 223
def alias_attribute(new_name, old_name)
attribute_method_matchers.each do |matcher|
matcher_new = matcher.method_name(new_name).to_s
matcher_old = matcher.method_name(old_name).to_s
define_optimized_call self, matcher_new, matcher_old
end
end
Defined in activemodel/lib/active_model/attribute_methods.rb line 223
· View on GitHub
· Improve this page
· Find usages on GitHub
Defined in ActiveModel::AttributeMethods::ClassMethods