merge pull request #148

This commit is contained in:
did 2011-07-28 15:03:13 +02:00
parent 08cac3b324
commit 6d66275def
4 changed files with 17 additions and 2 deletions

View File

@ -63,6 +63,11 @@ Locomotive.configure do |config|
# # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites) # # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites)
config.mailer_sender = 'support' config.mailer_sender = 'support'
# allow apps using the engine to add their own Liquid drops, variables and similar available
# in Liquid templates, extending the assigns used while rendering.
# follow the Dependency Injection pattern
# config.context_assign_extensions = {}
# Rack-cache settings, mainly used for the inline resizing image module. Default options: # Rack-cache settings, mainly used for the inline resizing image module. Default options:
# config.rack_cache = { # config.rack_cache = {
# :verbose => true, # :verbose => true,

View File

@ -61,6 +61,11 @@ Locomotive.configure do |config|
# # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites) # # => 'support@heroku.com' (Heroku), 'support@bushi.do' (Bushido), 'support@example.com' (Dev) or 'support@<your_hosting_platform>' (Multi-sites)
config.mailer_sender = 'support' config.mailer_sender = 'support'
# allow apps using the engine to add their own Liquid drops, variables and similar available
# in Liquid templates, extending the assigns used while rendering.
# follow the Dependency Injection pattern
# config.context_assign_extensions = {}
# Rack-cache settings, mainly used for the inline resizing image module. Default options: # Rack-cache settings, mainly used for the inline resizing image module. Default options:
# config.rack_cache = { # config.rack_cache = {
# :verbose => true, # :verbose => true,

View File

@ -22,7 +22,8 @@ module Locomotive
:metastore => URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/meta"), # URI encoded in case of spaces :metastore => URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/meta"), # URI encoded in case of spaces
:entitystore => URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/body") :entitystore => URI.encode("file:#{Rails.root}/tmp/dragonfly/cache/body")
}, },
:devise_modules => [:database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :encryptable, { :encryptor => :sha1 }] :devise_modules => [:database_authenticatable, :recoverable, :rememberable, :trackable, :validatable, :encryptable, { :encryptor => :sha1 }],
:context_assign_extensions => { }
} }
cattr_accessor :settings cattr_accessor :settings

View File

@ -68,7 +68,11 @@ module Locomotive
'url' => request.url, 'url' => request.url,
'now' => Time.now.utc, 'now' => Time.now.utc,
'today' => Date.today 'today' => Date.today
}.merge(flash.stringify_keys) # data from api }
assigns.merge!(Locomotive.config.context_assign_extensions)
assigns.merge!(flash.stringify_keys) # data from api
if @page.templatized? # add instance from content type if @page.templatized? # add instance from content type
assigns['content_instance'] = @content_instance assigns['content_instance'] = @content_instance