Skip to content

Commit

Permalink
Grr, Rails inter-version incompatibilities
Browse files Browse the repository at this point in the history
  • Loading branch information
gwolf committed Oct 7, 2011
1 parent f465d2c commit 5ff9cd1
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 2 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -12,3 +12,4 @@ db/schema.rb
public/javascripts/all.js public/javascripts/all.js
!app/views/layouts/application.* !app/views/layouts/application.*
app/views/layouts/* app/views/layouts/*
vendor/rails
8 changes: 7 additions & 1 deletion lib/menu_tree.rb
Expand Up @@ -65,7 +65,13 @@ def to_s
def build_link def build_link
@label ||= '' @label ||= ''
return @label if @link.nil? 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 end
# We can be dirty here, as we know where all this data is coming # 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 # from. If our menu is mallicious, there are bigger things to worry
Expand Down
1 change: 0 additions & 1 deletion vendor/rails

This file was deleted.

0 comments on commit 5ff9cd1

Please sign in to comment.