Sha256: 9118cc10677667d4450a75a81bc544f0c65a7a8308263ff26e63005281b12763

Contents?: true

Size: 360 Bytes

Versions: 3

Compression:

Stored size: 360 Bytes

Contents

module Field
  class Textarea < ActiveRecord::Base
    self.table_name = "field_textareas"

    has_one :part_object_field, as: :fieldable
    belongs_to :field_template

    delegate :title, to: :field_template, allow_nil: true
    delegate :is_required, to: :field_template, allow_nil: true

    validates :textarea, presence: { if: :is_required }

  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
activeadmin-magicfields-0.4.2 lib/app/models/field/textarea.rb
activeadmin-magicfields-0.4.1 lib/app/models/field/textarea.rb
activeadmin-magicfields-0.4.0 lib/app/models/field/textarea.rb