Sha256: d47a90910ac88f894cc8884ad843979f7cd1052bede48373ac361fec56457b8f

Contents?: true

Size: 463 Bytes

Versions: 54

Compression:

Stored size: 463 Bytes

Contents

module Para
  module ModelFieldParsers
    class Redactor < Para::ModelFieldParsers::Base
      register :redactor, self

      def parse!
        %w(content description).each do |field_name|
          field = fields_hash[field_name]

          if field && field.type == :text
            fields_hash[field_name] = Para::AttributeField::Redactor.new(
              field.model, name: field_name
            )
          end
        end
      end
    end
  end
end

Version data entries

54 entries across 54 versions & 1 rubygems

Version Path
para-0.11.4 lib/para/model_field_parsers/redactor.rb
para-0.11.3 lib/para/model_field_parsers/redactor.rb
para-0.11.2 lib/para/model_field_parsers/redactor.rb
para-0.11.1 lib/para/model_field_parsers/redactor.rb
para-0.11.0 lib/para/model_field_parsers/redactor.rb
para-0.10.0 lib/para/model_field_parsers/redactor.rb
para-0.9.4 lib/para/model_field_parsers/redactor.rb
para-0.9.3.3 lib/para/model_field_parsers/redactor.rb
para-0.9.3.2 lib/para/model_field_parsers/redactor.rb
para-0.9.3.1 lib/para/model_field_parsers/redactor.rb
para-0.9.2 lib/para/model_field_parsers/redactor.rb
para-0.9.0 lib/para/model_field_parsers/redactor.rb
para-0.8.15 lib/para/model_field_parsers/redactor.rb
para-0.8.14 lib/para/model_field_parsers/redactor.rb
para-0.8.13 lib/para/model_field_parsers/redactor.rb
para-0.8.12 lib/para/model_field_parsers/redactor.rb
para-0.8.11 lib/para/model_field_parsers/redactor.rb
para-0.8.10 lib/para/model_field_parsers/redactor.rb
para-0.8.9 lib/para/model_field_parsers/redactor.rb
para-0.8.8 lib/para/model_field_parsers/redactor.rb