diff options
Diffstat (limited to 'activesupport/lib/active_support')
-rw-r--r-- | activesupport/lib/active_support/core_ext/module/aliasing.rb | 4 |
1 files changed, 2 insertions, 2 deletions
diff --git a/activesupport/lib/active_support/core_ext/module/aliasing.rb b/activesupport/lib/active_support/core_ext/module/aliasing.rb index b36874520b..0280878b77 100644 --- a/activesupport/lib/active_support/core_ext/module/aliasing.rb +++ b/activesupport/lib/active_support/core_ext/module/aliasing.rb @@ -62,8 +62,8 @@ class Module # e.title # => "Megastars" def alias_attribute(new_name, old_name) module_eval <<-STR, __FILE__, __LINE__+1 - def #{new_name}; #{old_name}; end - def #{new_name}?; #{old_name}?; end + def #{new_name}; self.#{old_name}; end + def #{new_name}?; self.#{old_name}?; end def #{new_name}=(v); self.#{old_name} = v; end STR end |