Sha256: 640226f2e3f8b9c848a111ead6a4a52c9fad2b4ac46a5eb497a3fd70cf2478b1

Contents?: true

Size: 371 Bytes

Versions: 5

Compression:

Stored size: 371 Bytes

Contents

# encoding: UTF-8

module Spontaneous
  module FieldTypes
    class StringField < Field
      include Spontaneous::Plugins::Field::EditorClass

      def preprocess(value)
        Spontaneous::Utils::SmartQuotes.smarten(value.to_s)
      end

      def generate_html(value)
        escape_html(value)
      end
    end

    StringField.register :string, :title
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spontaneous-0.2.0.alpha7 lib/spontaneous/field_types/string_field.rb
spontaneous-0.2.0.alpha6 lib/spontaneous/field_types/string_field.rb
spontaneous-0.2.0.alpha5 lib/spontaneous/field_types/string_field.rb
spontaneous-0.2.0.alpha4 lib/spontaneous/field_types/string_field.rb
spontaneous-0.2.0.alpha3 lib/spontaneous/field_types/string_field.rb