diff --git a/.gitignore b/.gitignore index 2cf96d5..37ea68f 100644 --- a/.gitignore +++ b/.gitignore @@ -12,3 +12,4 @@ db/schema.rb public/javascripts/all.js !app/views/layouts/application.* app/views/layouts/* +vendor/rails diff --git a/lib/menu_tree.rb b/lib/menu_tree.rb index 29f2ec0..b50a243 100644 --- a/lib/menu_tree.rb +++ b/lib/menu_tree.rb @@ -65,7 +65,13 @@ def to_s def build_link @label ||= '' return @label if @link.nil? - return link_to(@label, @link.html_safe) + # Annoying syntax change in a minor Rails version update :-/ + begin + link = @link.html_safe! + rescue ActionView::TemplateError + link = @link.html_safe + end + return link_to(@label, link) end # We can be dirty here, as we know where all this data is coming # from. If our menu is mallicious, there are bigger things to worry diff --git a/vendor/rails b/vendor/rails deleted file mode 120000 index b15026e..0000000 --- a/vendor/rails +++ /dev/null @@ -1 +0,0 @@ -/usr/lib/ruby/vendor_ruby/rails \ No newline at end of file