ryana-inequal_opportunity 0.1.3 → 0.1.4
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.
- data/README +9 -5
- metadata +1 -1
data/README
CHANGED
@@ -20,9 +20,9 @@ table names for you.
|
|
20
20
|
|
21
21
|
ActiveRecord looks for Array and Range types to decide whether to use
|
22
22
|
'IN' or 'BETWEEN' instead of the normal '=' as the comparison operator
|
23
|
-
when
|
23
|
+
when generating SQL. inequal_opportunity extends that pattern by
|
24
24
|
wrapping the value in a series of ActiveRecord::Inequality::Base classes.
|
25
|
-
Just wrap the value
|
25
|
+
Just wrap the value with one of the following helper functions:
|
26
26
|
|
27
27
|
gte() => >=
|
28
28
|
gt() => >
|
@@ -48,11 +48,15 @@ in default scopes:
|
|
48
48
|
default_scope :conditions => {:type => ne('spam')}
|
49
49
|
end
|
50
50
|
|
51
|
-
and pretty much everywhere else I've tested.
|
51
|
+
and pretty much everywhere else I've tested manually.
|
52
52
|
|
53
53
|
Test coverage is kind of sparse right now, and it's only been tested
|
54
|
-
on MySQL.
|
55
|
-
|
54
|
+
on MySQL. But it has been rock solid in every situation I've thrown it in,
|
55
|
+
so I figured the best way to improve it was to release the hounds (YOU).
|
56
|
+
|
57
|
+
Note that I am not completely satisfied with the way I alias
|
58
|
+
ActiveRecord::Base.expand_range_bind_variables. It smells, but it works.
|
59
|
+
Suggestions welcome.
|
56
60
|
|
57
61
|
== License
|
58
62
|
|