aboutsummaryrefslogtreecommitdiffstats
path: root/lib/active_text/attribute.rb
diff options
context:
space:
mode:
Diffstat (limited to 'lib/active_text/attribute.rb')
-rw-r--r--lib/active_text/attribute.rb11
1 files changed, 11 insertions, 0 deletions
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