lib/str_enum.rb in str_enum-0.1.3 vs lib/str_enum.rb in str_enum-0.1.4
- old
+ new
@@ -15,10 +15,10 @@
read_attribute(column) == value
end
end
end
after_initialize do
- send("#{column}=", values.first) unless send(column)
+ send("#{column}=", values.first) unless try(column)
end
define_singleton_method column.to_s.pluralize do
values
end
end