Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Grr, Rails inter-version incompatibilities

  • Loading branch information...
commit 5ff9cd1bd9666be4020c603c343e9ca11a81d3f3 1 parent f465d2c
@gwolf authored
Showing with 8 additions and 2 deletions.
  1. +1 −0  .gitignore
  2. +7 −1 lib/menu_tree.rb
  3. +0 −1  vendor/rails
View
1  .gitignore
@@ -12,3 +12,4 @@ db/schema.rb
public/javascripts/all.js
!app/views/layouts/application.*
app/views/layouts/*
+vendor/rails
View
8 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
View
1  vendor/rails
Please sign in to comment.
Something went wrong with that request. Please try again.