Sha256: b2985801821c501c3e46ca2ff29deada4f0e96987c7327488e1de52b2459393d

Contents?: true

Size: 1.06 KB

Versions: 33

Compression:

Stored size: 1.06 KB

Contents

class Mumuki::Domain::Organization::Profile < Mumukit::Platform::Model
  LOCALES = Mumukit::Platform::Locale::SPECS

  model_attr_accessor :logo_url,
                      :banner_url,
                      :favicon_url,
                      :breadcrumb_image_url,
                      :open_graph_image_url,
                      :locale,
                      :description,
                      :contact_email,
                      :terms_of_service,
                      :community_link,
                      :errors_explanations

  def locale_json
    locale_h.to_json
  end

  def locale_h
    Mumukit::Platform::Locale::SPECS[locale]
  end

  def logo_url
    @logo_url ||= 'https://mumuki.io/logo-alt-large.png' # Best image size: 350x75
  end

  def banner_url
    @banner_url || logo_url  # Best image size: 350x75
  end

  def favicon_url
    @favicon_url ||= '/favicon.ico'  # Best image size: 16x16, 32x32 or 48x48
  end

  def open_graph_image_url
    @open_graph_image_url ||= Mumukit::Platform.application.url_for("logo-alt.png")  # Best image size: 256x256
  end
end

Version data entries

33 entries across 33 versions & 2 rubygems

Version Path
mumuki-domain-7.7.3 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.7.2 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.7.1 lib/mumuki/domain/organization/profile.rb
mumuki-laboratory-7.7.1 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-cb7a9018bb94/lib/mumuki/domain/organization/profile.rb
mumuki-laboratory-7.7.0 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-cb7a9018bb94/lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.7.0 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.6.1 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.6.0 lib/mumuki/domain/organization/profile.rb
mumuki-laboratory-7.5.2 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-ad16a5930cec/lib/mumuki/domain/organization/profile.rb
mumuki-laboratory-7.5.1 vendor/bundle/ruby/2.3.0/bundler/gems/mumuki-domain-a059418e5fd8/lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.5.1 lib/mumuki/domain/organization/profile.rb
mumuki-laboratory-7.5.0 vendor/bundle/ruby/2.6.0/bundler/gems/mumuki-domain-acb12583b793/lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.5.0 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.4.1 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.4.0 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.3.2 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.3.1 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.2.3 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.3.0 lib/mumuki/domain/organization/profile.rb
mumuki-domain-7.2.2 lib/mumuki/domain/organization/profile.rb