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

Inherits:
Form
  • Object
show all
Includes:
HasUploadValidations
Defined in:
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

Instance Method Details



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

def link
  return if super.blank?

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

  super
end

#typesObject



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

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