helper_methods 0.0.5 → 0.0.6

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,3 +1,3 @@
1
1
  module HelperMethods
2
- VERSION = "0.0.5"
2
+ VERSION = "0.0.6"
3
3
  end
@@ -88,6 +88,14 @@ module HelperMethods
88
88
  wrap_tag ? content_tag(wrap_tag, link, :class => css_class) : link
89
89
  end
90
90
 
91
+ def active_link_to_class(url, options = {})
92
+ if is_active_link?(url, options[:active])
93
+ options[:class_active] || 'active'
94
+ else
95
+ options[:class_inactive] || ''
96
+ end
97
+ end
98
+
91
99
  def is_active_link?(url, condition = nil)
92
100
  url = url_for(url).sub(/\?.*/, '') # ignore GET params
93
101
  case condition
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: helper_methods
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.0.5
4
+ version: 0.0.6
5
5
  prerelease:
6
6
  platform: ruby
7
7
  authors: