Permalink
Browse files

Grr, Rails inter-version incompatibilities

  • Loading branch information...
1 parent f465d2c commit 5ff9cd1bd9666be4020c603c343e9ca11a81d3f3 @gwolf committed Oct 7, 2011
Showing with 8 additions and 2 deletions.
  1. +1 −0 .gitignore
  2. +7 −1 lib/menu_tree.rb
  3. +0 −1 vendor/rails
View
@@ -12,3 +12,4 @@ db/schema.rb
public/javascripts/all.js
!app/views/layouts/application.*
app/views/layouts/*
+vendor/rails
View
@@ -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
View

0 comments on commit 5ff9cd1

Please sign in to comment.