noesya/osuny

View on GitHub
app/models/communication/block/component/rich_text.rb

Summary

Maintainability
A
0 mins
Test Coverage
B
85%
class Communication::Block::Component::RichText < Communication::Block::Component::Base

  def data=(value)
    value = SummernoteCleaner.clean value.to_s
    value = Osuny::Sanitizer.sanitize value, 'text'
    @data = value
  end

  def full_text
    ActionController::Base.helpers.strip_tags data
  end

end