Module: Amalgam
- Defined in:
- lib/amalgam.rb,
lib/amalgam/engine.rb,
lib/amalgam/version.rb,
lib/amalgam/editable.rb,
lib/amalgam/models/page.rb,
lib/amalgam/models/group.rb,
lib/amalgam/template_finder.rb,
lib/amalgam/tree/exportable.rb,
lib/amalgam/tree/importable.rb,
lib/amalgam/models/groupable.rb,
lib/amalgam/authorities/model.rb,
lib/amalgam/globalize/helpers.rb,
lib/amalgam/models/attachable.rb,
lib/amalgam/models/base_group.rb,
app/helpers/amalgam/url_helper.rb,
lib/amalgam/models/templatable.rb,
lib/amalgam/content_persistence.rb,
lib/amalgam/models/hierarchical.rb,
app/helpers/amalgam/pages_helper.rb,
app/helpers/amalgam/application_helper.rb,
app/helpers/amalgam/attachments_helper.rb,
app/helpers/amalgam/admin/layout_helper.rb,
app/helpers/amalgam/editor/editor_helper.rb,
lib/generators/amalgam/install_generator.rb,
app/controllers/amalgam/sessions_controller.rb,
lib/amalgam/authorities/controllers/helpers.rb,
lib/amalgam/authorities/models/active_record.rb,
app/controllers/amalgam/admin/base_controller.rb,
app/controllers/amalgam/admin/pages_controller.rb,
app/controllers/amalgam/application_controller.rb,
app/controllers/amalgam/admin/editor_controller.rb,
app/controllers/amalgam/admin/groups_controller.rb,
app/controllers/amalgam/registrations_controller.rb,
app/helpers/amalgam/editor/properties_builder_helper.rb
Defined Under Namespace
Modules: ApplicationHelper, AttachmentsHelper, Authorities, Editable, Generators, Globalize, Models, PagesHelper, TemplateFinder, Tree, UrlHelper, Validator
Classes: ApplicationController, ContentPersistence, Engine, RegistrationsController, SessionsController
Constant Summary
collapse
- VERSION =
"2.1.4.1"
- @@accepted_formats =
[".haml", ".erb"]
{}
- @@type_whitelist =
[]
- @@controllers =
[]
- @@authority_keys =
[:username]
- @@authorities =
{}
- @@authority_urls =
{}
- @@attachment_class_name =
'Attachment'
- @@i18n =
nil
- @@models_with_templates =
[]
- @@routes =
Proc.new do
resources :pages, :except => [:show]
end
Class Method Summary
collapse
Class Method Details
.admin_routes(&block) ⇒ Object
54
55
56
|
# File 'lib/amalgam.rb', line 54
def self.admin_routes(&block)
@@routes = Proc.new(&block)
end
|
.authority_model(model, options = {}) ⇒ Object
58
59
60
61
62
63
64
65
66
67
68
69
70
|
# File 'lib/amalgam.rb', line 58
def self.authority_model(model,options = {})
if options[:as].present?
@@authorities[model] = options[:as]
else
@@authorities[model] = :default
end
if options[:redirect_url].present?
@@authority_urls[model] = options[:redirect_url]
else
@@authority_urls[model] = nil
end
Amalgam::Authorities::Controllers::Helpers.amalgam_define_helpers(model.to_s,options)
end
|
.load_templates ⇒ Object
48
49
50
51
52
|
# File 'lib/amalgam.rb', line 48
def self.load_templates
models_with_templates.each do |model|
Amalgam::TemplateFinder::Rule.load(Rails.root,model.to_s)
end
end
|
.setup {|_self| ... } ⇒ Object
4
5
6
7
8
9
10
|
# File 'lib/amalgam.rb', line 4
def self.setup
require_all!
yield self
if !Rails.application.config.consider_all_requests_local
load_templates
end
end
|