Skip to content

Commit

Permalink
Ensure Refinery::I18n is defined in link_url_localised?
Browse files Browse the repository at this point in the history
  • Loading branch information
atj committed Mar 11, 2011
1 parent 8a40eed commit 2b28909
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions pages/app/models/page.rb
Original file line number Diff line number Diff line change
Expand Up @@ -126,6 +126,8 @@ def url
end

def link_url_localised?
return link_url unless defined?(::Refinery::I18n)

current_url = link_url

if current_url =~ %r{^/} && ::Refinery::I18n.current_frontend_locale != ::Refinery::I18n.default_frontend_locale
Expand Down

0 comments on commit 2b28909

Please sign in to comment.