README.md in gretel-3.0.1 vs README.md in gretel-3.0.2

- old
+ new

@@ -16,11 +16,11 @@ The old `:show_root_alone` option is still supported until Gretel version 4.0 and will show a deprecation warning when it's used. * Links yielded from `<%= breadcrumbs do |links| %>` now have a `current?` helper that returns true if the link is the last in the trail. * New view helper: `parent_breadcrumb` returns the parent breadcrumb link (with `#key`, `#text`, and `#url`). This can for example be used to create a dynamic back link. You can supply options like `:autoroot` etc. If you supply a block, it will yield the parent breadcrumb if it is present. -* Breadcrumbs can now be inferred if you pass in an ActiveRecord model instance. E.g. `breadcrumb @product` is short for `breadcrumb :product, @product`. +* Breadcrumbs can now be inferred if you pass in an instance of an object that responds to `model_name` (like an ActiveRecord model instance). E.g. `breadcrumb @product` is short for `breadcrumb :product, @product`. I hope you find these changes as useful as I did – if you have more suggestions, please create an [Issue](https://github.com/lassebunk/gretel/issues) or [Pull Request](https://github.com/lassebunk/gretel/pulls). See below for more info or the [changelog](https://github.com/lassebunk/gretel/blob/master/CHANGELOG.md) for less significant changes. @@ -254,13 +254,22 @@ If you have a large site and you want to split your breadcrumbs configuration over multiple files, you can create a folder named `config/breadcrumbs` and put your configuration files (e.g. `products.rb` or `frontend.rb`) in there. The format is the same as `config/breadcrumbs.rb` which is also loaded. ### Inferring breadcrumbs -Breadcrumbs can be automatically inferred if you pass in an ActiveRecord model instance. +Breadcrumbs can be automatically inferred if you pass an instance of an object that responds to `model_name` (like an ActiveRecord model instance). -For example `breadcrumb @product` is short for `breadcrumb :product, @product`. +For example: +```erb +<% breadcrumb @product %> +``` + +is short for + +```erb +<% breadcrumb :product, @product %> +``` ### Automatic reloading of breadcrumb configuration files Since Gretel version 2.1.0, the breadcrumb configuration files are now reloaded in the Rails development environment if they change. In other environments, like production, the files are loaded once, when first needed.