Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

nav_to preserves HTML class attr on active tabs.

a :class in the active_options will be appended to any classes
passed directly to nav_to, rather than replacing them.
  • Loading branch information...
commit da72f7f2e63476f93bed6c58d68c85df9102997d 1 parent 5529cd9
@bct bct authored
Showing with 3 additions and 1 deletion.
  1. +3 −1 lib/goose/helper.rb
View
4 lib/goose/helper.rb
@@ -9,7 +9,9 @@ def goose
def nav_to(place, url, options = {}, &block)
if goose.at?(place)
goose.current_address.resolve(url)
- options.update(Goose.config.active_options)
+ options.update(Goose.config.active_options) do |k,v1,v2|
+ k.to_s == 'class' ? "#{v1} #{v2}" : v2
+ end
end
content = link_to(place, url) if url
content_tag(Goose.config.wrapper_tag, content, options, &block)
Please sign in to comment.
Something went wrong with that request. Please try again.