From 5012d645daa65ef776d27eb973b3278302c36cad Mon Sep 17 00:00:00 2001 From: Javan Makhmali Date: Thu, 8 Feb 2018 15:48:45 -0500 Subject: Add initial ActiveRecord extension: `active_text_attribute` --- lib/active_text/attribute.rb | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 lib/active_text/attribute.rb (limited to 'lib/active_text/attribute.rb') diff --git a/lib/active_text/attribute.rb b/lib/active_text/attribute.rb new file mode 100644 index 0000000000..577adde83a --- /dev/null +++ b/lib/active_text/attribute.rb @@ -0,0 +1,11 @@ +module ActiveText + module Attribute + extend ActiveSupport::Concern + + class_methods do + def active_text_attribute(attribute_name) + serialize(attribute_name, ActiveText::Content) + end + end + end +end -- cgit v1.2.3