Sha256: b5e17b93344f2ebcdf3842109a37464d4d6a3b9c16142562ab06e8a487e4541b
Contents?: true
Size: 435 Bytes
Versions: 1
Compression:
Stored size: 435 Bytes
Contents
class Pulitzer::UpdateContentElement def initialize(content_element, params) @content_element, @params = content_element, params.dup end def call text_editor = Pulitzer.text_editor_toolbars.detect { |toolbar| toolbar[:name] == content_element.text_editor } if 'Kramdown' == text_editor[:kind] params[:body] = Kramdown::Document.new(params[:body]).to_html end @content_element.update params end end
Version data entries
1 entries across 1 versions & 1 rubygems
Version | Path |
---|---|
pulitzer-0.4.11 | app/interactions/pulitzer/update_content_element.rb |