Module: HeraCms

Defined in:
lib/hera_cms.rb,
lib/hera_cms/engine.rb,
lib/hera_cms/railtie.rb,
lib/hera_cms/version.rb,
app/models/hera_cms/link.rb,
app/models/hera_cms/text.rb,
app/models/hera_cms/image.rb,
app/helpers/hera_cms/tag_helper.rb,
app/jobs/hera_cms/application_job.rb,
app/models/hera_cms/application_record.rb,
app/helpers/hera_cms/application_helper.rb,
app/mailers/hera_cms/application_mailer.rb,
app/controllers/hera_cms/base_controller.rb,
app/controllers/hera_cms/links_controller.rb,
app/controllers/hera_cms/texts_controller.rb,
lib/generators/hera_cms/install_generator.rb,
app/controllers/hera_cms/images_controller.rb,
app/controllers/hera_cms/dashboard_controller.rb,
app/controllers/hera_cms/application_controller.rb

Defined Under Namespace

Modules: ApplicationHelper, Generators, TagHelper Classes: ApplicationController, ApplicationJob, ApplicationMailer, ApplicationRecord, BaseController, DashboardController, Engine, Error, Image, ImagesController, Link, LinksController, Railtie, Text, TextsController

Constant Summary collapse

VERSION =
'1.0.0'

Class Attribute Summary collapse

Class Method Summary collapse

Class Attribute Details

.image_uploadObject

attr_accessor :s3_bucket



17
18
19
# File 'lib/hera_cms.rb', line 17

def image_upload
  @image_upload
end

.upload_serviceObject

attr_accessor :s3_bucket



17
18
19
# File 'lib/hera_cms.rb', line 17

def upload_service
  @upload_service
end

Class Method Details

.active_storage?Boolean

Returns:

  • (Boolean)


25
26
27
# File 'lib/hera_cms.rb', line 25

def self.active_storage?
  self.image_upload && ["active_storage", :active_storage].include?(self.upload_service&.downcase)
end

.setup {|_self| ... } ⇒ Object

Yield self on setup for nice config blocks

Yields:

  • (_self)

Yield Parameters:

  • _self (HeraCms)

    the object that the method was called on



21
22
23
# File 'lib/hera_cms.rb', line 21

def self.setup
  yield self
end