We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent dbf1dba commit a047a0aCopy full SHA for a047a0a
lib/dynamoid/fields/declare.rb
@@ -43,6 +43,7 @@ def warn_about_method_overriding
43
end
44
45
def generate_instance_methods
46
+ # only local variable is visible in `module_eval` block
47
name = @name
48
49
@source.generated_methods.module_eval do
@@ -62,9 +63,11 @@ def generate_instance_methods
62
63
64
65
def generate_instance_methods_for_alias
- alias_name = @options[:alias].to_sym
66
67
68
69
+ alias_name = @options[:alias].to_sym
70
+
71
72
alias_method alias_name, name
73
alias_method "#{alias_name}=", "#{name}="
0 commit comments