spec/rails_app/app/controllers/comments_controller.rb in loaf-0.4.0 vs spec/rails_app/app/controllers/comments_controller.rb in loaf-0.5.0
- old
+ new
@@ -1,4 +1,17 @@
+class Article < Struct.new(:id, :title); end
+
class CommentsController < ApplicationController
+
+ breadcrumb lambda { |c| c.find_article(c.params[:post_id]).title },
+ lambda { |c| c.post_comments_path(c.params[:post_id]) }
+
def index
+ end
+
+ def show
+ end
+
+ def find_article(id)
+ ::Article.new(id, 'Post comments')
end
end