lib/str_enum.rb in str_enum-0.1.1 vs lib/str_enum.rb in str_enum-0.1.2
- old
+ new
@@ -16,9 +16,12 @@
end
end
after_initialize do
send("#{column}=", values.first) unless send(column)
end
+ define_singleton_method column.to_s.pluralize do
+ values
+ end
end
end
ActiveSupport.on_load(:active_record) do
extend(StrEnum)