Skip to content
Snippets Groups Projects
Commit 3864b418 authored by Arnaud Levy's avatar Arnaud Levy
Browse files

Merge branch 'refactor/blocks' of github.com:noesya/osuny into refactor/blocks

parents 343bbd11 99470758
No related branches found
No related tags found
No related merge requests found
class Communication::Block::Template
attr_reader :block, :fields
class_attribute :fields
attr_reader :block
def self.has_rich_text(property)
has_field property, :rich_text
......@@ -10,10 +12,9 @@ class Communication::Block::Template
end
def self.has_field(property, kind)
sanitizers = {
rich_text: 'text'
}
sanitizer_type = sanitizers[kind]
self.fields ||= []
self.fields << { name: property, type: kind }
class_eval <<-CODE, __FILE__, __LINE__ + 1
def #{property}
data['#{property}']
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment