45: def nested_set_full_outline(item, options=nil)
46: return if item.nil?
47: raise 'Not a nested set model !' if !item.respond_to? :acts_as_nested_set_options
48:
49: options = {
50: :text_column => options[:text_column] || item.acts_as_nested_set_options[:text_column],
51: :action => options[:action] || :show,
52: :controller => options[:controller] || item.class.underscore,
53: :separator => options[:separator] || ' > ' }
54:
55: s = ''
56: for it in item.ancestors
57: if block_given?
58: s += yield(it) + options[:separator]
59: else
60: s += link_to( it[options[:text_column]], { :controller => options[:controller], :action => options[:action], :id => it }) + options[:separator]
61: end
62: end
63: if block_given
64: s + yield(item)
65: else
66: s + h(item[text_column])
67: end
68: end