Class: Decidim::Conferences::Admin::PartnerForm

Inherits:
Form
  • Object
show all
Includes:
HasUploadValidations
Defined in:
decidim-conferences/app/forms/decidim/conferences/admin/partner_form.rb

Overview

A form object used to create conference members from the admin dashboard.

Instance Method Summary collapse

Methods included from HasUploadValidations

#maximum_avatar_size, #maximum_upload_size

Instance Method Details


39
40
41
42
43
44
45
# File 'decidim-conferences/app/forms/decidim/conferences/admin/partner_form.rb', line 39

def link
  return if super.blank?

  return "http://#{super}" unless super.match?(%r{\A(http|https)://}i)

  super
end

#typesObject


47
48
49
50
51
52
53
54
# File 'decidim-conferences/app/forms/decidim/conferences/admin/partner_form.rb', line 47

def types
  Decidim::Conferences::Partner::TYPES.map do |type|
    [
      I18n.t(type, scope: "decidim.admin.models.partner.types"),
      type
    ]
  end
end