source
stringclasses
1 value
repo
stringlengths
5
63
repo_url
stringlengths
24
82
path
stringlengths
5
167
language
stringclasses
1 value
license
stringclasses
5 values
stars
int64
10
51.4k
ref
stringclasses
23 values
size_bytes
int64
200
258k
text
stringlengths
137
258k
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/call_to_action/element.rb
Ruby
mit
48
main
207
class Communication::Block::Template::CallToAction::Element < Communication::Block::Template::Base has_component :title, :string has_component :url, :string has_component :target_blank, :boolean end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/definition/element.rb
Ruby
mit
48
main
233
class Communication::Block::Template::Definition::Element < Communication::Block::Template::Base has_component :title, :string has_component :description, :rich_text def empty? title.blank? && description.blank? end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/testimonial/element.rb
Ruby
mit
48
main
267
class Communication::Block::Template::Testimonial::Element < Communication::Block::Template::Base has_component :text, :rich_text has_component :author, :string has_component :job, :string has_component :photo, :image def empty? text.blank? end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/feature/element.rb
Ruby
mit
48
main
328
class Communication::Block::Template::Feature::Element < Communication::Block::Template::Base has_component :title, :string has_component :description, :rich_text has_component :image, :image has_component :alt, :string has_component :credit, :rich_text def empty? title.blank? && description.blank? ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/key_figure/element.rb
Ruby
mit
48
main
278
class Communication::Block::Template::KeyFigure::Element < Communication::Block::Template::Base has_component :number, :number has_component :unit, :string has_component :description, :string has_component :image, :image def blob image_component.blob end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/organization/element.rb
Ruby
mit
48
main
990
class Communication::Block::Template::Organization::Element < Communication::Block::Template::Base has_component :id, :organization has_component :name, :string has_component :url, :string has_component :logo, :image has_component :role, :string def organization id_component.organization end def ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/person/element.rb
Ruby
mit
48
main
247
class Communication::Block::Template::Person::Element < Communication::Block::Template::Base has_component :id, :person has_component :role, :string def person id_component.person end def person_id id_component.data end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/timeline/element.rb
Ruby
mit
48
main
217
class Communication::Block::Template::Timeline::Element < Communication::Block::Template::Base has_component :title, :string has_component :text, :rich_text def empty? title.blank? && text.blank? end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/block/template/contact/element.rb
Ruby
mit
48
main
345
class Communication::Block::Template::Contact::Element < Communication::Block::Template::Base has_component :title, :string has_component :time_slot_morning, :time_slot has_component :time_slot_afternoon, :time_slot def empty? title.blank? && time_slot_morning['from'].blank? && time_slot_afternoon[...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda.rb
Ruby
mit
48
main
437
module Communication::Website::Agenda extend ActiveModel::Naming extend ActiveModel::Translation STATUS_CURRENT = 'current' STATUS_FUTURE = 'future' STATUS_FUTURE_OR_CURRENT = 'future_or_current' STATUS_ARCHIVE = 'archive' AUTHORIZED_SCOPES = [ STATUS_FUTURE_OR_CURRENT, STATUS_CURRENT, STATU...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_production.rb
Ruby
mit
48
main
536
module Communication::Website::WithProduction extend ActiveSupport::Concern included do before_validation :set_in_production_at scope :in_production, -> { where(in_production: true) } scope :for_production, -> (production, language = nil) { where(in_production: production) } scope :ordered_by_prod...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_alerts.rb
Ruby
mit
48
main
609
module Communication::Website::WithFeatureAlerts extend ActiveSupport::Concern included do has_many :alerts, class_name: "Communication::Website::Alert", foreign_key: :communication_website_id, dependent: :destroy has_many :alert_localizations, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_content_archive.rb
Ruby
mit
48
main
893
module Communication::Website::WithContentArchive extend ActiveSupport::Concern included do ARCHIVABLE_MODEL_NAMES = [ 'Communication::Website::Post::Localization', 'Communication::Website::Agenda::Event::Localization', 'Communication::Website::Agenda::Exhibition::Localization' ].freeze ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_plausible.rb
Ruby
mit
48
main
385
module Communication::Website::WithPlausible extend ActiveSupport::Concern def has_plausible? plausible_url.present? end # https://plausible.io/share/osuny.org?auth=[FILTERED] => osuny.org def plausible_site_domain return unless has_plausible? uri = URI.parse(plausible_url) uri.path.delete_p...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_configs.rb
Ruby
mit
48
main
2,526
module Communication::Website::WithConfigs extend ActiveSupport::Concern included do def self.config_files [ :apache_config, :default_content_security_policy, :default_languages, :deuxfleurs_config, :deuxfleurs_workflow, :development_config, :netlif...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/alert.rb
Ruby
mit
48
main
1,746
# == Schema Information # # Table name: communication_website_alerts # # id :uuid not null, primary key # deleted_at :datetime # kind :integer default("info"), not null # created_at :datetime not null # updated_at ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/permalink.rb
Ruby
mit
48
main
6,314
# == Schema Information # # Table name: communication_website_permalinks # # id :uuid not null, primary key # about_type :string indexed => [about_id] # is_current :boolean default(TRUE) # path :string # target_url :string # created_at :datetime ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_jobboard.rb
Ruby
mit
48
main
941
module Communication::Website::WithFeatureJobboard extend ActiveSupport::Concern included do has_many :jobboard_jobs, class_name: "Communication::Website::Jobboard::Job", foreign_key: :communication_website_id, dependent: :destroy alias :jobs :jobboa...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/page.rb
Ruby
mit
48
main
5,327
# == Schema Information # # Table name: communication_website_pages # # id :uuid not null, primary key # bodyclass :string # deleted_at :datetime # full_width :boolean default(FALSE) # migration_identifier :string # position...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_connected_objects.rb
Ruby
mit
48
main
8,928
module Communication::Website::WithConnectedObjects extend ActiveSupport::Concern included do CONNECTIONS_BLACKLIST = [ # Les blobs ne sont jamais modifiés, donc on n'a aucun besoin de savoir à quoi ils sont connectés 'ActiveStorage::Blob' ].freeze has_many :connections, dependent: :destro...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/git_file.rb
Ruby
mit
48
main
4,419
# == Schema Information # # Table name: communication_website_git_files # # id :uuid not null, primary key, indexed => [website_id] # about_type :string indexed => [about_id] # current_path :string # current_sha :string # desynchronized :boolean de...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_menus.rb
Ruby
mit
48
main
2,120
module Communication::Website::WithMenus extend ActiveSupport::Concern included do has_many :menus, class_name: 'Communication::Website::Menu', foreign_key: :communication_website_id, dependent: :destroy after_save :initialize_menus end def menu_item...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_posts.rb
Ruby
mit
48
main
1,104
module Communication::Website::WithFeaturePosts extend ActiveSupport::Concern included do has_many :posts, foreign_key: :communication_website_id, dependent: :destroy has_many :authors, -> { distinct }, through: :posts has_many :post_categories, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_open_api.rb
Ruby
mit
48
main
2,038
module Communication::Website::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website", properties: { id: { type: :string, format: :uuid }, url: { type: :string, nullable: true }, hosting: { type: :string,...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_screenshot.rb
Ruby
mit
48
main
756
module Communication::Website::WithScreenshot extend ActiveSupport::Concern included do has_one_attached :screenshot has_one_attached :screenshot_full_page end def screenshot! return if url.blank? make_screenshot! make_screenshot!(full_page: true) end protected def make_screenshot!...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_federations.rb
Ruby
mit
48
main
2,091
# frozen_string_literal: true module Communication::Website::WithFederations extend ActiveSupport::Concern included do has_and_belongs_to_many :source_websites, join_table: :communication_website_federations, foreign_key: :destination_website_id, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_realm_university.rb
Ruby
mit
48
main
371
module Communication::Website::WithRealmUniversity extend ActiveSupport::Concern def blocks_from_university Communication::Block.where(about: connected_people).or( Communication::Block.where(about: connected_organizations) ) end def has_organizations? connected_organizations.any? end de...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_realm_education.rb
Ruby
mit
48
main
936
module Communication::Website::WithRealmEducation extend ActiveSupport::Concern def blocks_from_education Communication::Block.where(about: education_programs).or( Communication::Block.where(about: education_diplomas) ) end def education_schools has_education_schools? ? about.schools : Educa...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/showcase.rb
Ruby
mit
48
main
1,156
module Communication::Website::Showcase FEATURES = [ :actualites, :agenda, :portfolio, :jobboard ].freeze def self.table_name_prefix "communication_website_showcase_" end def self.features FEATURES.map do |feature| { name: title_for_feature(feature), path: "/#...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_managers.rb
Ruby
mit
48
main
389
module Communication::Website::WithManagers extend ActiveSupport::Concern included do has_and_belongs_to_many :managers, class_name: 'User', join_table: :communication_websites_users, foreign_key: :communication_website_id, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_program_categories.rb
Ruby
mit
48
main
2,604
module Communication::Website::WithProgramCategories extend ActiveSupport::Concern included do after_save_commit :set_programs_categories, if: -> (website) { website.has_education_programs? } end def set_programs_categories Communication::Website::SetProgramsCategoriesJob.perform_later(id) end de...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_security.rb
Ruby
mit
48
main
2,314
module Communication::Website::WithSecurity extend ActiveSupport::Concern def allowed_domains list = allowed_domains_default list.concat allowed_domains_plausible list.concat allowed_domains_from_all_blocks_video list.concat allowed_domains_from_all_blocks_embed list.uniq.compact end prote...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_time_zone.rb
Ruby
mit
48
main
272
module Communication::Website::WithTimeZone extend ActiveSupport::Concern included do before_validation :set_default_time_zone_if_blank end def set_default_time_zone_if_blank self.default_time_zone = default_time_zone.presence || Time.zone.name end end
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_realm_research.rb
Ruby
mit
48
main
1,068
module Communication::Website::WithRealmResearch extend ActiveSupport::Concern def blocks_from_research Communication::Block.where(about: research_papers) end def research_journals has_research_journals? ? about.journals : Research::Journal.none end def research_laboratories has_research_labo...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_realm_communication.rb
Ruby
mit
48
main
435
module Communication::Website::WithRealmCommunication extend ActiveSupport::Concern included do has_many :permalinks, class_name: "Communication::Website::Permalink", dependent: :destroy has_many :communication_blocks, class_name: "Communication::Block...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/connection.rb
Ruby
mit
48
main
2,639
# == Schema Information # # Table name: communication_website_connections # # id :uuid not null, primary key # direct_source_type :string indexed => [direct_source_id] # indirect_object_type :string not null, indexed => [indirect_object_id] # created_at ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_alumni.rb
Ruby
mit
48
main
1,010
module Communication::Website::WithFeatureAlumni extend ActiveSupport::Concern def can_have_feature_alumni? about_type == Education::School.name || about_type == Education::Program.name end def alumni has_alumni? ? about.alumni : University::Person.none end def cohorts has_alumni? ? about.coh...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_theme.rb
Ruby
mit
48
main
1,210
module Communication::Website::WithTheme extend ActiveSupport::Concern included do scope :with_automatic_update, -> { where(autoupdate_theme: true) } scope :with_manual_update, -> { where(autoupdate_theme: false) } scope :for_theme_version, -> (version, language = nil) { where(theme_version: version) ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_style.rb
Ruby
mit
48
main
1,618
module Communication::Website::WithStyle extend ActiveSupport::Concern def preview_style load_style if style_outdated? style end protected def load_style @style = '' load_style_from_website_url if url.present? load_style_from_example make_assets_relative! self.update_columns sty...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_showcase.rb
Ruby
mit
48
main
637
module Communication::Website::WithShowcase extend ActiveSupport::Concern included do has_and_belongs_to_many :showcase_tags, class_name: 'Communication::Website::Showcase::Tag', join_table: :communication_website_showcase_tags_websites, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_portfolio.rb
Ruby
mit
48
main
1,049
module Communication::Website::WithFeaturePortfolio extend ActiveSupport::Concern included do has_many :portfolio_projects, class_name: "Communication::Website::Portfolio::Project", foreign_key: :communication_website_id, dependent: :destroy al...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_hosting.rb
Ruby
mit
48
main
413
module Communication::Website::WithHosting extend ActiveSupport::Concern included do enum :hosting, { undefined: 0, deuxfleurs: 1, apache: 2, nginx: 3, netlify: 4 }, prefix: :hosted_with scope :for_hosting, ->(hosting, language = nil) { where(hosting: hosting) } end...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/content_federation.rb
Ruby
mit
48
main
2,107
# == Schema Information # # Table name: communication_website_content_federations # # id :uuid not null, primary key # about_type :string not null, indexed => [about_id] # created_at :datetime not null # updated_at :dateti...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_lock.rb
Ruby
mit
48
main
649
module Communication::Website::WithLock extend ActiveSupport::Concern included do # TODO use this to kill a task LOCK_MAX_DURATION = 2.hours end def locked_for_background_jobs?(executing_job_id) reload # Website is locked if locked_at is present and the job which locked it is not the current j...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post.rb
Ruby
mit
48
main
4,346
# == Schema Information # # Table name: communication_website_posts # # id :uuid not null, primary key # bodyclass :string # deleted_at :datetime # full_width :boolean default(FALSE) # is_lasting :boolean d...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_realm_administration.rb
Ruby
mit
48
main
493
module Communication::Website::WithRealmAdministration extend ActiveSupport::Concern def administrators has_administrators? ? about.administrators : University::Person.none end def administration_locations has_administration_locations? ? about.administration_locations : Administration::Location.none ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/menu.rb
Ruby
mit
48
main
2,973
# == Schema Information # # Table name: communication_website_menus # # id :uuid not null, primary key # automatic :boolean default(TRUE) # identifier :string # title :string # created_at :datetime not ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_feature_agenda.rb
Ruby
mit
48
main
2,960
module Communication::Website::WithFeatureAgenda extend ActiveSupport::Concern included do has_many :agenda_events, class_name: "Communication::Website::Agenda::Event", foreign_key: :communication_website_id, dependent: :destroy alias :events :agenda...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/localization.rb
Ruby
mit
48
main
3,382
# == Schema Information # # Table name: communication_website_localizations # # id :uuid not null, primary key # name :string # published :boolean default(FALSE) # published_at :datetime # social_email :string # social_facebook :string # social_githu...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_deuxfleurs.rb
Ruby
mit
48
main
3,649
module Communication::Website::WithDeuxfleurs extend ActiveSupport::Concern included do before_save :deuxfleurs_golive, if: :hosted_with_deuxfleurs? after_save :deuxfleurs_setup, if: :hosted_with_deuxfleurs? end # 4 options: # 1. no deuxfleurs hosting at all -> do nothing # 2. no repo, deuxfleurs ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_git_repository.rb
Ruby
mit
48
main
4,110
module Communication::Website::WithGitRepository extend ActiveSupport::Concern included do has_many :website_git_files, class_name: 'Communication::Website::GitFile', dependent: :destroy alias_method :git_files, :website_git_files has_many :website_git_file_orph...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/with_pages.rb
Ruby
mit
48
main
1,349
module Communication::Website::WithPages extend ActiveSupport::Concern included do has_many :pages, foreign_key: :communication_website_id, dependent: :destroy has_many :page_categories, class_name: "Communication::Website::Page::Category", ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/with_open_api.rb
Ruby
mit
48
main
892
module Communication::Website::Post::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Post", properties: { id: { type: :string, format: :uuid }, migration_identifier: { type: :string, nullable: true }, ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/category.rb
Ruby
mit
48
main
2,693
# == Schema Information # # Table name: communication_website_post_categories # # id :uuid not null, primary key # bodyclass :string # is_programs_root :boolean default(FALSE) # is_taxonomy :boolean default(FALSE) # migration_i...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/localization.rb
Ruby
mit
48
main
4,632
# == Schema Information # # Table name: communication_website_post_localizations # # id :uuid not null, primary key # deleted_at :datetime # featured_image_alt :string # featured_image_credit :text # header_cta :boolean default(FALSE) ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/category/localization.rb
Ruby
mit
48
main
2,667
# == Schema Information # # Table name: communication_website_post_category_localizations # # id :uuid not null, primary key # breadcrumb_title :string # featured_image_alt :string # featured_image_credit :text # header_cta :boolean default(...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/category/with_open_api.rb
Ruby
mit
48
main
924
module Communication::Website::Post::Category::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Post::Category", properties: { id: { type: :string, format: :uuid }, migration_identifier: { type: :string, nu...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/category/localization/with_open_api.rb
Ruby
mit
48
main
1,568
module Communication::Website::Post::Category::Localization::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Post::Category::Localization", properties: { id: { type: :string, format: :uuid }, migration_ide...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/post/localization/with_open_api.rb
Ruby
mit
48
main
1,536
module Communication::Website::Post::Localization::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Post::Localization", properties: { id: { type: :string, format: :uuid }, migration_identifier: { type: :st...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/git_file/layout.rb
Ruby
mit
48
main
1,267
# == Schema Information # # Table name: communication_website_git_file_layouts # # id :uuid not null, primary key # path :string # created_at :datetime not null # updated_at :datetime not null # communication_website_...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/git_file/orphan.rb
Ruby
mit
48
main
1,400
# == Schema Information # # Table name: communication_website_git_file_orphans # # id :uuid not null, primary key # path :string # created_at :datetime not null # updated_at :datetime not null # communication_website_...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/git_file/with_content.rb
Ruby
mit
48
main
1,898
module Communication::Website::GitFile::WithContent extend ActiveSupport::Concern included do has_one_attached :current_content_file end def current_content return '' unless current_content_file.attached? @current_content ||= ActiveStorage::Utils.text_from_attachment(current_content_file) end ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/jobboard/category.rb
Ruby
mit
48
main
2,584
# == Schema Information # # Table name: communication_website_jobboard_categories # # id :uuid not null, primary key # bodyclass :string # is_programs_root :boolean default(FALSE) # is_taxonomy :boolean default(FALSE) # migrati...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/jobboard/job.rb
Ruby
mit
48
main
2,890
# == Schema Information # # Table name: communication_website_jobboard_jobs # # id :uuid not null, primary key # bodyclass :string # deleted_at :datetime # from_day :date # migration_identifier :string # to_day :d...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/jobboard/category/localization.rb
Ruby
mit
48
main
2,743
# == Schema Information # # Table name: communication_website_jobboard_category_localizations # # id :uuid not null, primary key # breadcrumb_title :string # featured_image_alt :string # featured_image_credit :text # header_cta :boolean defa...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/jobboard/job/localization.rb
Ruby
mit
48
main
3,976
# == Schema Information # # Table name: communication_website_jobboard_job_localizations # # id :uuid not null, primary key # deleted_at :datetime # featured_image_alt :string # featured_image_credit :text # header_cta :boolean default...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/development_config.rb
Ruby
mit
48
main
388
# -*- SkipSchemaAnnotations class Communication::Website::Configs::DevelopmentConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::DevelopmentConfig' end def git_path(website) "config/development/config.yaml" end def template_static "admin/c...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/nginx_config.rb
Ruby
mit
48
main
344
# -*- SkipSchemaAnnotations class Communication::Website::Configs::NginxConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::NginxConfig' end def can_have_git_file? false end def template_static "admin/communication/websites/configs/nginx_co...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/production_config.rb
Ruby
mit
48
main
384
# -*- SkipSchemaAnnotations class Communication::Website::Configs::ProductionConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::ProductionConfig' end def git_path(website) "config/production/config.yaml" end def template_static "admin/comm...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/default_languages.rb
Ruby
mit
48
main
385
# -*- SkipSchemaAnnotations class Communication::Website::Configs::DefaultLanguages < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::DefaultLanguages' end def git_path(website) "config/_default/languages.yaml" end def template_static "admin/com...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/apache_config.rb
Ruby
mit
48
main
359
# -*- SkipSchemaAnnotations class Communication::Website::Configs::ApacheConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::ApacheConfig' end def git_path(website) "static/.htaccess" end def template_static "admin/communication/websites/co...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/deuxfleurs_workflow.rb
Ruby
mit
48
main
393
# -*- SkipSchemaAnnotations class Communication::Website::Configs::DeuxfleursWorkflow < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::DeuxfleursWorkflow' end def git_path(website) ".github/workflows/deuxfleurs.yml" end def template_static "adm...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/deuxfleurs_config.rb
Ruby
mit
48
main
370
# -*- SkipSchemaAnnotations class Communication::Website::Configs::DeuxfleursConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::DeuxfleursConfig' end def git_path(website) "deuxfleurs.toml" end def template_static "admin/communication/webs...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/netlify_config.rb
Ruby
mit
48
main
358
# -*- SkipSchemaAnnotations class Communication::Website::Configs::NetlifyConfig < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::NetlifyConfig' end def git_path(website) "netlify.toml" end def template_static "admin/communication/websites/conf...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/base.rb
Ruby
mit
48
main
741
# -*- SkipSchemaAnnotations class Communication::Website::Configs::Base < Communication::Website def self.polymorphic_name raise NoMethodError, "You must implement the `polymorphic_name` class method in #{self.class.name}" end def git_path(website) raise NoMethodError, "You must implement the `git_path`...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/robots_txt.rb
Ruby
mit
48
main
351
# -*- SkipSchemaAnnotations class Communication::Website::Configs::RobotsTxt < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::RobotsTxt' end def git_path(website) "static/robots.txt" end def template_static "admin/communication/websites/configs...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/configs/default_content_security_policy.rb
Ruby
mit
48
main
426
# -*- SkipSchemaAnnotations class Communication::Website::Configs::DefaultContentSecurityPolicy < Communication::Website::Configs::Base def self.polymorphic_name 'Communication::Website::Configs::DefaultContentSecurityPolicy' end def git_path(website) "data/content_security_policy.yaml" end def tem...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/showcase/tag.rb
Ruby
mit
48
main
779
# == Schema Information # # Table name: communication_website_showcase_tags # # id :uuid not null, primary key # name :string # slug :string # created_at :datetime not null # updated_at :datetime not null # class Communication::Website::Showcase::Tag < ApplicationRec...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/localization/with_open_api.rb
Ruby
mit
48
main
1,202
module Communication::Website::Localization::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Localization", properties: { id: { type: :string, format: :uuid }, name: { type: :string }, published: {...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event.rb
Ruby
mit
48
main
6,562
# == Schema Information # # Table name: communication_website_agenda_events # # id :uuid not null, primary key # bodyclass :string # deleted_at :datetime # from_day :date # is_lasting :boolean default(FALSE) # is...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/category.rb
Ruby
mit
48
main
2,867
# == Schema Information # # Table name: communication_website_agenda_categories # # id :uuid not null, primary key # bodyclass :string # is_programs_root :boolean default(FALSE) # is_taxonomy :boolean default(FALSE) # migration...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/exhibition.rb
Ruby
mit
48
main
4,142
# == Schema Information # # Table name: communication_website_agenda_exhibitions # # id :uuid not null, primary key # bodyclass :string # deleted_at :datetime # from_day :date # is_lasting :boolean default(FALSE) ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/with_status.rb
Ruby
mit
48
main
490
module Communication::Website::Agenda::WithStatus extend ActiveSupport::Concern def status if future? Communication::Website::Agenda::STATUS_FUTURE elsif current? Communication::Website::Agenda::STATUS_CURRENT else Communication::Website::Agenda::STATUS_ARCHIVE end end def fu...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/category/with_open_api.rb
Ruby
mit
48
main
930
module Communication::Website::Agenda::Category::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Agenda::Category", properties: { id: { type: :string, format: :uuid }, migration_identifier: { type: :string...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/category/localization.rb
Ruby
mit
48
main
2,727
# == Schema Information # # Table name: communication_website_agenda_category_localizations # # id :uuid not null, primary key # breadcrumb_title :string # featured_image_alt :string # featured_image_credit :text # header_cta :boolean defaul...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/category/localization/with_open_api.rb
Ruby
mit
48
main
1,572
module Communication::Website::Agenda::Category::Localization::WithOpenApi extend ActiveSupport::Concern included do OPENAPI_SCHEMA = { type: :object, title: "Communication::Website::Agenda::Category::Localization", properties: { id: { type: :string, format: :uuid }, migration...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/year.rb
Ruby
mit
48
main
3,202
# == Schema Information # # Table name: communication_website_agenda_period_years # # id :uuid not null, primary key # needs_checking :boolean default(FALSE) # value :integer uniquely indexed => [university_id, communication_website_id]...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/base.rb
Ruby
mit
48
main
659
module Communication::Website::Agenda::Period::Base extend ActiveSupport::Concern included do after_save :create_all_localizations after_touch :create_all_localizations after_touch :touch_localizations scope :ordered, -> { order(:value) } default_scope { ordered } end # Just for debugging...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/month.rb
Ruby
mit
48
main
2,446
# == Schema Information # # Table name: communication_website_agenda_period_months # # id :uuid not null, primary key # value :integer uniquely indexed => [university_id, communication_website_id, year_id] # created_at :datetime not ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/in_period.rb
Ruby
mit
48
main
1,944
module Communication::Website::Agenda::Period::InPeriod extend ActiveSupport::Concern included do before_validation :set_time_zone before_validation :set_to_day validates :from_day, presence: true validate :year_is_a_four_digit_number, :to_day_after_from_day, :to_hour_...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/day.rb
Ruby
mit
48
main
2,304
# == Schema Information # # Table name: communication_website_agenda_period_days # # id :uuid not null, primary key # date :date # value :integer uniquely indexed => [university_id, communication_website_id, year_id, month_id] # creat...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/month/localization.rb
Ruby
mit
48
main
2,879
# == Schema Information # # Table name: communication_website_agenda_period_month_localizations # # id :uuid not null, primary key # slug :string # created_at :datetime not null # updated_at :datetime not null # about...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/day/localization.rb
Ruby
mit
48
main
2,578
# == Schema Information # # Table name: communication_website_agenda_period_day_localizations # # id :uuid not null, primary key # events_count :integer default(0) # slug :string # created_at :datetime not null # updat...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/period/year/localization.rb
Ruby
mit
48
main
2,692
# == Schema Information # # Table name: communication_website_agenda_period_year_localizations # # id :uuid not null, primary key # slug :string # created_at :datetime not null # updated_at :datetime not null # about_...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/day.rb
Ruby
mit
48
main
3,282
# == Schema Information # # Table name: communication_website_agenda_event_days # # id :uuid not null, primary key # date :date # created_at :datetime not null # updated_at :...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/with_days.rb
Ruby
mit
48
main
1,095
module Communication::Website::Agenda::Event::WithDays extend ActiveSupport::Concern included do has_many :days, foreign_key: :communication_website_agenda_event_id, dependent: :destroy after_save :generate_days, if: :kind_parent? after_restore :generate_days, if: :kind_par...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/localization.rb
Ruby
mit
48
main
6,862
# == Schema Information # # Table name: communication_website_agenda_event_localizations # # id :uuid not null, primary key # add_to_calendar_urls :jsonb # deleted_at :datetime # featured_image_alt :string # featured_image_credit :text # header_cta ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/with_period_sync.rb
Ruby
mit
48
main
1,944
module Communication::Website::Agenda::Event::WithPeriodSync extend ActiveSupport::Concern included do after_save_commit :sync_periods_later after_destroy :sync_periods_later after_restore :sync_periods_later end def sync_periods_safely dates_concerned.each { |date| touch_period_day(date) } ...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/time_slot.rb
Ruby
mit
48
main
4,842
# == Schema Information # # Table name: communication_website_agenda_event_time_slots # # id :uuid not null, primary key # datetime :datetime # deleted_at :datetime # duration :integer...
github
osunyorg/admin
https://github.com/osunyorg/admin
app/models/communication/website/agenda/event/with_time_slots.rb
Ruby
mit
48
main
2,945
module Communication::Website::Agenda::Event::WithTimeSlots extend ActiveSupport::Concern included do TIME_SLOTS_LIMIT = 30 has_many :time_slots, foreign_key: :communication_website_agenda_event_id, dependent: :destroy, inverse_of: :communication_website_agenda_...