order_me 0.0.5 → 0.0.6
Sign up to get free protection for your applications and to get access to all the features.
- 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
|
|