Closed tom-kuca closed 2 years ago
Fix an error when an attribute name is a keyword, e.g. alias, end, …
alias
end
Given
attribute :alias, :string
I got an error
SyntaxError: active_type-2.2.0/lib/active_type/virtual_attributes.rb:103: syntax error, unexpected '[', expecting `end' ...ias != virtual_attributes_were["alias"]
The patch adds a prefix self that fixes the syntax error in generated code.
self
self.alias != virtual_attributes_were["alias"]
Sorry for the slow response, thanks for the PR!
Fix an error when an attribute name is a keyword, e.g.
alias
,end
, …Given
I got an error
The patch adds a prefix
self
that fixes the syntax error in generated code.