Module: NoCms::Blocks
- Includes:
- ActiveSupport::Configurable
- Defined in:
- lib/nocms-blocks.rb,
lib/no_cms/blocks/engine.rb,
lib/no_cms/blocks/version.rb,
app/models/no_cms/blocks/block.rb,
lib/no_cms/blocks/configuration.rb,
app/models/no_cms/blocks/block_slot.rb,
app/helpers/no_cms/blocks/blocks_helper.rb,
app/helpers/no_cms/blocks/application_helper.rb,
lib/generators/nocms/blocks/layout_generator.rb,
app/serializers/no_cms/blocks/date_serializer.rb,
app/controllers/no_cms/blocks/application_controller.rb,
app/models/no_cms/blocks/concerns/serializing_fields.rb,
app/models/no_cms/blocks/concerns/translation_scopes.rb,
app/serializers/no_cms/blocks/simple_field_serializer.rb,
app/serializers/no_cms/blocks/active_record_serializer.rb,
app/serializers/no_cms/blocks/base_multiple_serializer.rb,
app/serializers/no_cms/blocks/active_resource_serializer.rb
Defined Under Namespace
Modules: ApplicationHelper, BlocksHelper, Concerns
Classes: ActiveRecordSerializer, ActiveResourceSerializer, ApplicationController, BaseMultipleSerializer, BaseSerializer, Block, BlockSlot, DateSerializer, Engine, Layout, LayoutGenerator, SimpleFieldSerializer, Template, TemplateMigrationGenerator, Zone
Constant Summary
collapse
- VERSION =
"1.2.0"
Class Method Summary
collapse
Class Method Details
.installed_db_gem ⇒ Object
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
|
# File 'lib/no_cms/blocks/configuration.rb', line 86
def self.installed_db_gem
installed_db_gem = ['mysql2', 'pg', 'sqlite3'].detect do |db_gem|
begin
Gem::Specification.find_by_name(db_gem)
rescue Gem::LoadError
false
rescue
Gem.available?(db_gem)
end
end
raise 'Neither mysql2, pg nor sqlite3 gems have been detected' unless installed_db_gem
installed_db_gem
end
|
.templates_config ⇒ Object
80
81
82
83
84
|
# File 'lib/no_cms/blocks/configuration.rb', line 80
def self.templates_config
@templates_config ||= NoCms::Blocks.templates.map do |template_name, template_config|
NoCms::Blocks::Template.new template_name, template_config
end
end
|