Skip to content
Browse files

Self should exist by default

  • Loading branch information...
1 parent ea5df99 commit c9a3b8189021bef3d7a10f3bb474ffec01bde0eb @pyromaniac pyromaniac committed Mar 18, 2012
View
1 app/controllers/pages_controller.rb
@@ -3,7 +3,6 @@ class PagesController < ApplicationController
def index
page = Page.find_page(params[:path])
- @self = page.to_drop(self)
render page, :content_type => page.content_type
end
end
View
1 lib/puffer_pages/liquid/tags/attribute.rb
@@ -21,6 +21,7 @@ def initialize(tag_name, markup, tokens)
def render(context)
page = context[@page]
+ page = context.registers[:page] unless page.is_a?(PufferPages::Liquid::PageDrop)
context.stack do
context['self'] = page
View
1 lib/puffer_pages/renderer.rb
@@ -36,6 +36,7 @@ def puffer_page_render_options page
registers[key] = value
end
end
+ drops[:self] = page.to_drop(@view.controller)
{:drops => drops, :registers => registers}
end
end

0 comments on commit c9a3b81

Please sign in to comment.
Something went wrong with that request. Please try again.