filterrific 0.1.0 → 0.2.0

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/doc/ideas.txt +11 -6
  3. data/filterrific.gemspec +2 -2
  4. metadata +3 -3
data/VERSION CHANGED
@@ -1 +1 @@
1
- 0.1.0
1
+ 0.2.0
@@ -10,19 +10,23 @@ MODEL
10
10
  =====
11
11
 
12
12
  filterrific do
13
+
13
14
  associations do
14
15
  person # creates a scope for filterrific
15
- state, :default => [1,2,3,4], :label => "Publishing state", :as => :select, :multiple => 4
16
+ state, :default => [1,2,3,4], :type => :select, :multiple => 4
16
17
  end
17
18
 
18
19
  scopes do
19
20
  active_only, :default => true # refers to already defined scope
21
+ search, :as => "q" (optional param name override)
20
22
  sorted_by, :default => "created_at_desc"
21
23
  end
22
24
 
23
25
  persist_in_session false # overrides global filterrific settings
24
26
  end
25
27
 
28
+ scope :search, ...
29
+
26
30
  Only filters defined in filterrific will be exposed via URL. Other scopes will not be accessible
27
31
 
28
32
  view
@@ -36,8 +40,9 @@ CONTROLLER
36
40
  ==========
37
41
 
38
42
  def index
39
- init_filterrific(Publication, :publications_list)
40
- @publications = Publication.filterrific(@filter_options).paginate...
43
+ @filter_options = init_filterrific(Publication, :publications_list)
44
+ @publications = Publication.filterrific(@filter_options).paginate....
45
+ @publications = current_user.publications.filterrific(@filter_options).paginate....
41
46
  ...
42
47
  end
43
48
 
@@ -48,8 +53,8 @@ def init_filterrific(klass, scope = nil)
48
53
  @filter_options = Filterrific.new(Publication, params[:filter_options])
49
54
  session[scope_name] = @filter_options.to_hash if filterrific.persist_in_session # (store sanitized options). Maybe just define marshal dump? skip to_hash
50
55
  end
51
-
52
-
56
+
57
+
53
58
  Filterrific CONFIG
54
59
  ==================
55
60
 
@@ -72,7 +77,7 @@ CONTENT FOR README
72
77
 
73
78
 
74
79
 
75
- This Rails plugin makes it super simple to add filtering to your rails list views.
80
+ This Rails engine makes it super simple to add filtering to your rails list views.
76
81
 
77
82
  Some of the features:
78
83
  ---------------------
@@ -5,11 +5,11 @@
5
5
 
6
6
  Gem::Specification.new do |s|
7
7
  s.name = %q{filterrific}
8
- s.version = "0.1.0"
8
+ s.version = "0.2.0"
9
9
 
10
10
  s.required_rubygems_version = Gem::Requirement.new(">= 0") if s.respond_to? :required_rubygems_version=
11
11
  s.authors = ["Jo Hund"]
12
- s.date = %q{2010-08-01}
12
+ s.date = %q{2010-08-25}
13
13
  s.description = %q{
14
14
  The Rails User Interface solution for filtering your ActiveRecord lists:
15
15
 
metadata CHANGED
@@ -4,9 +4,9 @@ version: !ruby/object:Gem::Version
4
4
  prerelease: false
5
5
  segments:
6
6
  - 0
7
- - 1
7
+ - 2
8
8
  - 0
9
- version: 0.1.0
9
+ version: 0.2.0
10
10
  platform: ruby
11
11
  authors:
12
12
  - Jo Hund
@@ -14,7 +14,7 @@ autorequire:
14
14
  bindir: bin
15
15
  cert_chain: []
16
16
 
17
- date: 2010-08-01 00:00:00 -07:00
17
+ date: 2010-08-25 00:00:00 -07:00
18
18
  default_executable:
19
19
  dependencies:
20
20
  - !ruby/object:Gem::Dependency