Permalink
Browse files

Merge branch 'patch-1' of https://github.com/amalagaura/apotomo

  • Loading branch information...
2 parents 0a3a122 + a7c23c6 commit 6e8d1a22fda4f8f973b586aa706cdb1bffc62638 @apotonick committed Jan 3, 2012
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.rdoc
View
@@ -62,10 +62,10 @@ You now tell your controller about the new widget.
include Apotomo::Rails::ControllerMethods
has_widgets do |root|
- root << widget('comments_widget', 'post-comments', :post => @post)
+ root << widget('comments_widget', :post => @post)
end
-The widget is named <tt>post-comments</tt>. We pass the current post into the widget - the block is executed in controller instance context, that's were <tt>@post</tt> comes from. Handy, isn't it?
+This creates a widget instance called <tt>comments_widget</tt> from the class CommentsWidget. We pass the current post into the widget - the block is executed in controller instance context, that's were <tt>@post</tt> comes from. Handy, isn't it?
== Render the widget
@@ -77,7 +77,7 @@ Rendering usually happens in your controller view, <tt>views/posts/show.html.ham
@post.body
%p
- = render_widget 'post-comments'
+ = render_widget 'comments_widget'
== Write the widget

0 comments on commit 6e8d1a2

Please sign in to comment.