buscar 1.0.1 → 1.0.2

Sign up to get free protection for your applications and to get access to all the features.
Files changed (4) hide show
  1. data/VERSION +1 -1
  2. data/buscar.gemspec +2 -2
  3. data/lib/buscar/helpers.rb +4 -2
  4. metadata +4 -4
data/VERSION CHANGED
@@ -1 +1 @@
1
- 1.0.1
1
+ 1.0.2
data/buscar.gemspec CHANGED
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{buscar}
8
- s.version = "1.0.1"
8
+ s.version = "1.0.2"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["jarrett"]
12
- s.date = %q{2010-12-12}
12
+ s.date = %q{2010-12-22}
13
13
  s.description = %q{Simplifies searching, sorting, and pagination of ActiveRecord models. Includes a model class and a view helper.}
14
14
  s.email = %q{jarrettcolby@gmail.com}
15
15
  s.extra_rdoc_files = [
@@ -57,10 +57,12 @@ module Buscar
57
57
  index.send("#{type}_param_options").each do |param, label_str|
58
58
  choices << content_tag('li') do
59
59
  label_str = param.to_s.humanize if label_str.nil?
60
- if !options[:link_to_current] and index.filter_param.to_s == param.to_s
60
+ is_selected = index.filter_param.to_s == param.to_s
61
+ if is_selected and !options[:link_to_current]
61
62
  ('<span class="selected">' + label_str + '</span>').html_safe
62
63
  else
63
- link_to label_str, yield(param)
64
+ link_options = is_selected ? {:class => 'selected'} : {}
65
+ link_to label_str, yield(param), link_options
64
66
  end
65
67
  end
66
68
  end
metadata CHANGED
@@ -1,13 +1,13 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: buscar
3
3
  version: !ruby/object:Gem::Version
4
- hash: 21
4
+ hash: 19
5
5
  prerelease: false
6
6
  segments:
7
7
  - 1
8
8
  - 0
9
- - 1
10
- version: 1.0.1
9
+ - 2
10
+ version: 1.0.2
11
11
  platform: ruby
12
12
  authors:
13
13
  - jarrett
@@ -15,7 +15,7 @@ autorequire:
15
15
  bindir: bin
16
16
  cert_chain: []
17
17
 
18
- date: 2010-12-12 00:00:00 -06:00
18
+ date: 2010-12-22 00:00:00 -05:00
19
19
  default_executable:
20
20
  dependencies:
21
21
  - !ruby/object:Gem::Dependency