order_me 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.
- data/lib/order_me.rb +12 -8
- metadata +1 -1
data/lib/order_me.rb
CHANGED
@@ -1,12 +1,16 @@
|
|
1
1
|
class ActiveRecord::Base
|
2
|
-
|
2
|
+
# @col_names = column_names
|
3
3
|
|
4
|
-
|
5
|
-
|
6
|
-
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
4
|
+
# class << self
|
5
|
+
# @col_names.each do |name|
|
6
|
+
# define_method "order_me_by_#{name}" do
|
7
|
+
# order("#{name} DESC")
|
8
|
+
# end
|
9
|
+
# end
|
10
|
+
# end
|
11
|
+
|
12
|
+
def self.order_me args
|
13
|
+
defalt_scope args
|
14
|
+
end
|
11
15
|
end
|
12
16
|
|