Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Newer
Older
100644 55 lines (37 sloc) 1.288 kB
5c3a32e @zachinglis Adding a README
zachinglis authored
1 h1. Crummy
2
3 h2. Introduction
4
5 Crummy is a simple and tasty way to add breadcrumbs to your Rails applications.
6
7 h2. Example
8
c237a1c @zachinglis Documented the methods
zachinglis authored
9 In your controllers you may add_crumb either like a before_filter or within a method (It is also available to views).
10
11 <pre>
12 <code>
13 class ApplicationController
14 add_crumb "Home", '/'
15 end
16
17 class BusinessController < ApplicationController
18 add_crumb("Business") { |instance| instance.business_path }
19
20 def show
21 add_crumb @business.display_name, @business
22 end
23 end
24 </code>
25 </pre>
26
b0c8477 @zachinglis Finished README file
zachinglis authored
27 Then in your view:
28
29 <pre>
30 <code>
31 <%= render_crumbs %>
32 </code>
33 </pre>
34
c50c9b4 @zachinglis I should spellcheck more
zachinglis authored
35 You can specify an argument for a separator, but it defaults to <code>" &raquo; "</code>
b0c8477 @zachinglis Finished README file
zachinglis authored
36
37 h2. Notes
38
c237a1c @zachinglis Documented the methods
zachinglis authored
39 The variable set is set to @_crumbs not to conflict with your code.
5c3a32e @zachinglis Adding a README
zachinglis authored
40
6879adf @zachinglis Frack yeah. Plugin is full functionality and fully tested
zachinglis authored
41 h2. Todo
42
c237a1c @zachinglis Documented the methods
zachinglis authored
43 * Port over rspecs from project to plugin (Fully tested in a project)
6879adf @zachinglis Frack yeah. Plugin is full functionality and fully tested
zachinglis authored
44 * Accept instances of models as a single argument
45
5c3a32e @zachinglis Adding a README
zachinglis authored
46 h2. Credits
47
48 * "Zach Inglis":http://zachinglis.com
79117ce @zachinglis Basic code in place
zachinglis authored
49 * "Rein Henrichs":http://reinh.com
5c3a32e @zachinglis Adding a README
zachinglis authored
50 * "Les Hill":http://blog.leshill.org/
b80420a @zachinglis Adding Sandro to Credits
zachinglis authored
51 * "Sandro Turriate":http://turriate.com/
79117ce @zachinglis Basic code in place
zachinglis authored
52 * "Przemysław Kowalczyk":http://szeryf.wordpress.com/2008/06/13/easy-and-flexible-breadcrumbs-for-rails/ - feature ideas
5c3a32e @zachinglis Adding a README
zachinglis authored
53
54 *Copyright (c) 2008 Zach Inglis, released under the MIT license*
Something went wrong with that request. Please try again.