help to create public form with has_one field

This commit is contained in:
did 2011-06-03 02:25:19 +02:00
parent a5bf4664f2
commit abcf4f684a
2 changed files with 6 additions and 1 deletions

View File

@ -4,6 +4,10 @@ module Locomotive
class Content < Base
delegate :meta_keywords, :meta_description, :to => '@source'
def _id
@source._id.to_s
end
def before_method(meth)
return '' if @source.nil?

View File

@ -62,7 +62,8 @@ module Locomotive
'asset_collections' => Locomotive::Liquid::Drops::AssetCollections.new,
'contents' => Locomotive::Liquid::Drops::Contents.new,
'current_page' => self.params[:page],
'params' => self.params
'params' => self.params,
'url' => request.url
}.merge(flash.stringify_keys) # data from api
if @page.templatized? # add instance from content type