Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

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

  • Loading branch information...
commit 6e8d1a22fda4f8f973b586aa706cdb1bffc62638 2 parents 0a3a122 + a7c23c6
@apotonick authored
Showing with 3 additions and 3 deletions.
  1. +3 −3 README.rdoc
View
6 README.rdoc
@@ -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
Please sign in to comment.
Something went wrong with that request. Please try again.