Sha256: ade37132815e4a5dbbcb122a7d60428d761bac45f756fbecfd9e918c3ae34ff9

Contents?: true

Size: 501 Bytes

Versions: 3

Compression:

Stored size: 501 Bytes

Contents

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]) }

  breadcrumb -> { find_article(params[:post_id]).title + " No Controller" },
             -> { post_comments_path(params[:post_id], no_controller: true) }

  def index
  end

  def show
  end

  def find_article(id)
    ::Article.new(id, 'Post comments')
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
loaf-0.8.1 spec/rails_app/app/controllers/comments_controller.rb
loaf-0.8.0 spec/rails_app/app/controllers/comments_controller.rb
loaf-0.7.0 spec/rails_app/app/controllers/comments_controller.rb