10. Ariane - Construction
# app/controllers/application_controller.rb
class ApplicationController < ActionController::Base
before_filter :set_ariane
def set_ariane
ariane.add "Home", root_path
end
end
# app/controllers/articles_controller.rb
class ArticlesController < ApplicationController
def set_ariane
super
ariane.add "Articles", articles_path
end
end
21. Ariane - La suite ?
Dynamic Breadcrumb
Big thanks to Anthony Bouch (github: 58bits)
Sucre syntaxique
# app/views/articles/show.html.erb
<% ariane.add @article.title, @article %>